mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-18 07:24:10 +02:00
Remove extraneous code
This commit is contained in:
parent
9cc44d4d70
commit
714d98a1d4
1 changed files with 0 additions and 18 deletions
|
@ -496,24 +496,6 @@ class User(AbstractUser):
|
|||
|
||||
return active_requests_count
|
||||
|
||||
# def is_only_admin_of_portfolio(self, portfolio):
|
||||
# """Check if the user is the only admin of the given portfolio."""
|
||||
|
||||
# UserPortfolioPermission = apps.get_model("registrar", "UserPortfolioPermission")
|
||||
|
||||
# # Grab admin permission ability we want
|
||||
# admin_permission = UserPortfolioPermissionChoices.EDIT_PORTFOLIO
|
||||
|
||||
# # Get all users with admin permission for this portfolio
|
||||
# admins = UserPortfolioPermission.objects.filter(portfolio=portfolio, roles__contains=[admin_permission])
|
||||
|
||||
# # Check if there is more than one admin
|
||||
# if admins.count() == 1 and admins.first().user == self:
|
||||
# # The user is the only admin
|
||||
# return True
|
||||
# # There are other admins OR the user is not the only one
|
||||
# return False
|
||||
|
||||
def is_only_admin_of_portfolio(self, portfolio):
|
||||
"""Check if the user is the only admin of the given portfolio."""
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue