From 06a5803bba480d26fbc7dc2f79e2666c53f3e98e Mon Sep 17 00:00:00 2001 From: David Kennedy Date: Thu, 25 Jul 2024 08:47:52 -0400 Subject: [PATCH] lint plus migrations --- src/registrar/context_processors.py | 1 + ...r_user_portfolio_additional_permissions.py | 38 +++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 src/registrar/migrations/0114_alter_user_portfolio_additional_permissions.py diff --git a/src/registrar/context_processors.py b/src/registrar/context_processors.py index 9854cf404..06ef07050 100644 --- a/src/registrar/context_processors.py +++ b/src/registrar/context_processors.py @@ -61,6 +61,7 @@ def add_path_to_context(request): def add_has_profile_feature_flag_to_context(request): return {"has_profile_feature_flag": flag_is_active(request, "profile_feature")} + def portfolio_permissions(request): """Make portfolio permissions for the request user available in global context""" try: diff --git a/src/registrar/migrations/0114_alter_user_portfolio_additional_permissions.py b/src/registrar/migrations/0114_alter_user_portfolio_additional_permissions.py new file mode 100644 index 000000000..55645298f --- /dev/null +++ b/src/registrar/migrations/0114_alter_user_portfolio_additional_permissions.py @@ -0,0 +1,38 @@ +# Generated by Django 4.2.10 on 2024-07-25 12:45 + +import django.contrib.postgres.fields +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("registrar", "0113_user_portfolio_user_portfolio_additional_permissions_and_more"), + ] + + operations = [ + migrations.AlterField( + model_name="user", + name="portfolio_additional_permissions", + field=django.contrib.postgres.fields.ArrayField( + base_field=models.CharField( + choices=[ + ("view_all_domains", "View all domains and domain reports"), + ("view_managed_domains", "View managed domains"), + ("view_member", "View members"), + ("edit_member", "Create and edit members"), + ("view_all_requests", "View all requests"), + ("view_created_requests", "View created requests"), + ("edit_requests", "Create and edit requests"), + ("view_portfolio", "View organization"), + ("edit_portfolio", "Edit organization"), + ], + max_length=50, + ), + blank=True, + help_text="Select one or more additional permissions.", + null=True, + size=None, + ), + ), + ]