mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-01 15:34:53 +02:00
updated tests related to updated permissions
This commit is contained in:
parent
f275245f69
commit
07b1010dd4
2 changed files with 9 additions and 8 deletions
|
@ -1457,10 +1457,11 @@ class SeniorOfficialAdmin(ListHeaderAdmin):
|
|||
|
||||
# Check if user is in OMB analysts group
|
||||
if request.user.groups.filter(name="omb_analysts_group").exists():
|
||||
annotated_qs = self.get_annotated_queryset(qs)
|
||||
return annotated_qs.filter(
|
||||
converted_federal_type=BranchChoices.EXECUTIVE,
|
||||
)
|
||||
# annotated_qs = self.get_annotated_queryset(qs)
|
||||
# return annotated_qs.filter(
|
||||
# converted_federal_type=BranchChoices.EXECUTIVE,
|
||||
# )
|
||||
return qs.filter(federal_agency__federal_type=BranchChoices.EXECUTIVE)
|
||||
|
||||
return qs # Return full queryset if the user doesn't have the restriction
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue