mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-21 16:51:08 +02:00
Merge branch 'za/bugfix-hide-csv-export-button-on-empty' into za/2348-csv-export-org-member-domain-export
This commit is contained in:
commit
a0bfdbf2b1
6 changed files with 11 additions and 2 deletions
|
@ -428,3 +428,8 @@ class User(AbstractUser):
|
|||
def is_org_user(self, request):
|
||||
has_organization_feature_flag = flag_is_active(request, "organization_feature")
|
||||
return has_organization_feature_flag and self.has_base_portfolio_permission()
|
||||
|
||||
def user_domain_count(self):
|
||||
"""Returns the number of domains associated with this user through UserDomainRole"""
|
||||
available_domains = UserDomainRole.objects.filter(user=self, domain__isnull=False)
|
||||
return available_domains.count()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue