Skip to content

Commit

Permalink
Remove space supporter from being allowed to transfer route ownership
Browse files Browse the repository at this point in the history
- pr feedback

Authored-by: Michael Oleske <[email protected]>
  • Loading branch information
moleske committed Aug 3, 2022
1 parent 9875032 commit 227ba7d
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion app/controllers/v3/routes_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def transfer_owner
message = RouteTransferOwnerMessage.new(hashed_params[:body])
unprocessable!(message.errors.full_messages) unless message.valid?

unauthorized! unless permission_queryer.can_manage_apps_in_active_space?(route.space.guid)
unauthorized! unless permission_queryer.can_write_to_active_space?(route.space.guid)

target_space = Space.first(guid: message.guid)
target_space_error = if target_space.nil? || !can_read_space?(target_space)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,3 @@ HTTP/1.1 204 No Content
--- |
Admin |
Space Developer |
Space Supporter |
1 change: 0 additions & 1 deletion spec/request/routes_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3180,7 +3180,6 @@
h['no_role'] = { code: 404 }
h['org_billing_manager'] = { code: 404 }
h['space_developer'] = { code: 200 }
h['space_supporter'] = { code: 200 }
h
end

Expand Down

0 comments on commit 227ba7d

Please sign in to comment.