mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-02 16:02:15 +02:00
This commit is contained in:
parent
18f7269cf0
commit
e96e450878
1 changed files with 1 additions and 6 deletions
|
@ -205,12 +205,7 @@ class PortfolioMembersJson(View):
|
|||
return queryset
|
||||
|
||||
def serialize_members(self, request, portfolio, item, user):
|
||||
# Check if the user can edit other users
|
||||
user_can_edit_other_users = any(
|
||||
user.has_perm(perm) for perm in ["registrar.full_access_permission", "registrar.change_user"]
|
||||
)
|
||||
|
||||
view_only = not user.has_edit_members_portfolio_permission(portfolio) or not user_can_edit_other_users
|
||||
view_only = not user.has_edit_members_portfolio_permission(portfolio)
|
||||
|
||||
is_admin = UserPortfolioRoleChoices.ORGANIZATION_ADMIN in (item.get("roles") or [])
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue