File tree Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 1- (defproject com.flexiana /framework " 0.2.1 "
1+ (defproject com.flexiana /framework " 0.2.2 "
22 :description " Framework"
33 :url " https://github.com/Flexiana/framework"
44 :license {:name " FIXME" :url " FIXME" }
Original file line number Diff line number Diff line change 66
77(def action-mapping
88 {:get :read
9- :post :update
10- :put :create
9+ :post :create
10+ :put :update
1111 :delete :delete })
1212
1313(defn- ->resource
3535 |req: | action: |
3636 |------- |---------|
3737 |:get | :read |
38- |:post | :update |
39- |:put | :create |
38+ |:post | :create |
39+ |:put | :update |
4040 |:delete | :delete |"
4141 ([{{user :user } :session-data
4242 roles :acl/roles
Original file line number Diff line number Diff line change 115115 (get-error (is-allowed (state-with-user-request guest " /items/" :post )))))
116116 (is (= :own
117117 (get-ok (is-allowed (state-with-user-request member " /addresses/" :post )))))
118+ (is (= :own
119+ (get-ok (is-allowed (state-with-user-request member " /users/" :put )))))
120+ (is (= {:status 401 , :body " Authorization error" }
121+ (get-error (is-allowed (state-with-user-request member " /users/" :post )))))
118122 (is (= :all
119123 (get-ok (is-allowed (state-with-user-request admin " /items/" :get )))))
120124 (is (= :all
You can’t perform that action at this time.
0 commit comments