Skip to content

Commit

Permalink
added comment
Browse files Browse the repository at this point in the history
  • Loading branch information
dvoet committed Feb 8, 2021
1 parent e861d89 commit 8043bf4
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,9 @@ trait ResourceRoutes extends UserInfoDirectives with SecurityDirectives with Sam

def deleteResource(resource: FullyQualifiedResourceId, userInfo: UserInfo, samRequestContext: SamRequestContext): server.Route =
delete {
// Note that this does not require remove_child on the parent if it exists. remove_child is meant to prevent
// users from removing a child only to add it to a different parent and thus circumvent any permissions
// a parent may be enforcing. Deleting a child does not allow this situation.
requireAction(resource, SamResourceActions.delete, userInfo.userId, samRequestContext) {
complete(resourceService.deleteResource(resource, samRequestContext).map(_ => StatusCodes.NoContent))
}
Expand Down

0 comments on commit 8043bf4

Please sign in to comment.