File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -1337,7 +1337,13 @@ def get_queryset(self):
13371337 name__iexact = "IFRC Admins" ,
13381338 user = OuterRef ("pk" ),
13391339 )
1340- )
1340+ ),
1341+ is_local_unit_global_validator = models .Exists (
1342+ Group .objects .filter (
1343+ name__iexact = "Local Unit Global Validators" ,
1344+ user = OuterRef ("pk" ),
1345+ )
1346+ ),
13411347 )
13421348 .filter (is_active = True )
13431349 )
Original file line number Diff line number Diff line change @@ -1647,7 +1647,9 @@ class Meta:
16471647class UserSerializer (ModelSerializer ):
16481648 profile = ProfileSerializer ()
16491649 subscription = MiniSubscriptionSerializer (many = True )
1650+ # NOTE: This field is annotated in the viewset
16501651 is_ifrc_admin = serializers .BooleanField (read_only = True )
1652+ is_local_unit_global_validator = serializers .BooleanField (read_only = True )
16511653
16521654 class Meta :
16531655 model = User
@@ -1661,6 +1663,7 @@ class Meta:
16611663 "subscription" ,
16621664 "is_superuser" ,
16631665 "is_ifrc_admin" ,
1666+ "is_local_unit_global_validator" ,
16641667 )
16651668
16661669 def create (self , _ ):
@@ -1745,6 +1748,7 @@ class Meta:
17451748 "is_per_admin_for_countries" ,
17461749 "user_countries_regions" ,
17471750 "limit_access_to_guest" ,
1751+ "is_local_unit_global_validator" ,
17481752 )
17491753
17501754 @staticmethod
You can’t perform that action at this time.
0 commit comments