mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-20 03:19:24 +02:00
minor fix to context processors
This commit is contained in:
parent
17997259ef
commit
1b25be8d96
1 changed files with 7 additions and 1 deletions
|
@ -41,7 +41,13 @@ def is_production(request):
|
|||
|
||||
|
||||
def portfolio_permissions(request):
|
||||
""""""
|
||||
"""Make portfolio permissions for the request user available in global context"""
|
||||
if not request.user.is_authenticated:
|
||||
return {
|
||||
"has_base_portfolio_permission": False,
|
||||
"has_domains_portfolio_permission": False,
|
||||
"has_domain_requests_portfolio_permission": False,
|
||||
}
|
||||
return {
|
||||
"has_base_portfolio_permission": request.user.has_portfolio_permission(
|
||||
User.UserPortfolioPermissionChoices.VIEW_PORTFOLIO
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue