Skip to content

Commit 4bb8ccd

Browse files
committed
fix(metadata): modify permissions check on edit
1 parent 3767664 commit 4bb8ccd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/placeos-rest-api/controllers/metadata.cr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ module PlaceOS::Api
1919
###############################################################################################
2020

2121
# Does the user making the request have permissions to modify the data
22-
@[AC::Route::Filter(:before_action, only: [:destroy])]
23-
def check_delete_permissions(
24-
@[AC::Param::Info(name: "id", description: "the parent id of the metadata to be destroyed")]
22+
@[AC::Route::Filter(:before_action, only: [:update, :destroy])]
23+
def check_modify_permissions(
24+
@[AC::Param::Info(name: "id", description: "the parent id of the metadata to be modified")]
2525
parent_id : String
2626
)
2727
return if user_support? || parent_id == user_token.id

0 commit comments

Comments
 (0)