mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-30 06:26:34 +02:00
make userportfoliopermission editable again
also removed help text
This commit is contained in:
parent
d6542f18b1
commit
7b2b4f0401
5 changed files with 49 additions and 22 deletions
|
@ -1243,7 +1243,6 @@ class UserDomainRoleResource(resources.ModelResource):
|
|||
model = models.UserDomainRole
|
||||
|
||||
|
||||
# Note: This is "viewonly" for analysts
|
||||
class UserPortfolioPermissionAdmin(ListHeaderAdmin):
|
||||
form = UserPortfolioPermissionsForm
|
||||
change_form_template = "django/admin/user_portfolio_permission_change_form.html"
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
# Generated by Django 4.2.10 on 2024-09-25 17:59
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
import registrar.models.federal_agency
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("registrar", "0129_create_groups_v17"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name="portfolio",
|
||||
name="federal_agency",
|
||||
field=models.ForeignKey(
|
||||
default=registrar.models.federal_agency.FederalAgency.get_non_federal_agency,
|
||||
on_delete=django.db.models.deletion.PROTECT,
|
||||
to="registrar.federalagency",
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="portfolio",
|
||||
name="organization_name",
|
||||
field=models.CharField(blank=True, null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="portfolio",
|
||||
name="organization_type",
|
||||
field=models.CharField(
|
||||
blank=True,
|
||||
choices=[
|
||||
("federal", "Federal"),
|
||||
("interstate", "Interstate"),
|
||||
("state_or_territory", "State or territory"),
|
||||
("tribal", "Tribal"),
|
||||
("county", "County"),
|
||||
("city", "City"),
|
||||
("special_district", "Special district"),
|
||||
("school_district", "School district"),
|
||||
],
|
||||
max_length=255,
|
||||
null=True,
|
||||
),
|
||||
),
|
||||
]
|
|
@ -1,18 +0,0 @@
|
|||
# Generated by Django 4.2.10 on 2024-09-25 14:28
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("registrar", "0129_create_groups_v17"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name="portfolio",
|
||||
name="organization_name",
|
||||
field=models.CharField(blank=True, null=True),
|
||||
),
|
||||
]
|
|
@ -41,7 +41,6 @@ class Portfolio(TimeStampedModel):
|
|||
choices=OrganizationChoices.choices,
|
||||
null=True,
|
||||
blank=True,
|
||||
help_text="Type of organization",
|
||||
)
|
||||
|
||||
notes = models.TextField(
|
||||
|
@ -52,7 +51,6 @@ class Portfolio(TimeStampedModel):
|
|||
federal_agency = models.ForeignKey(
|
||||
"registrar.FederalAgency",
|
||||
on_delete=models.PROTECT,
|
||||
help_text="Associated federal agency",
|
||||
unique=False,
|
||||
default=FederalAgency.get_non_federal_agency,
|
||||
)
|
||||
|
|
|
@ -79,7 +79,7 @@ class UserGroup(Group):
|
|||
{
|
||||
"app_label": "registrar",
|
||||
"model": "userportfoliopermission",
|
||||
"permissions": ["view_userportfoliopermission"],
|
||||
"permissions": ["add_userportfoliopermission", "change_userportfoliopermission", "delete_userportfoliopermission"],
|
||||
},
|
||||
]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue