mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-16 07:19:13 +08:00
Merge pull request #15780 from martenson/user-api
[23.0] fix premature return in user API
This commit is contained in:
@@ -297,7 +297,7 @@ class UserAPIController(BaseGalaxyAPIController, UsesTagsMixin, BaseUIController
|
||||
else:
|
||||
user = trans.user
|
||||
else:
|
||||
return managers_base.get_object(
|
||||
user = managers_base.get_object(
|
||||
trans,
|
||||
user_id,
|
||||
"User",
|
||||
@@ -306,9 +306,7 @@ class UserAPIController(BaseGalaxyAPIController, UsesTagsMixin, BaseUIController
|
||||
# check that the user is requesting themselves (and they aren't del'd) unless admin
|
||||
if not trans.user_is_admin:
|
||||
if trans.user != user or user.deleted:
|
||||
raise exceptions.InsufficientPermissionsException(
|
||||
"You are not allowed to perform action on that user", id=user_id
|
||||
)
|
||||
raise exceptions.RequestParameterInvalidException("Invalid user id specified", id=user_id)
|
||||
return user
|
||||
except exceptions.MessageException:
|
||||
raise
|
||||
|
||||
Reference in New Issue
Block a user