Skip to content
Snippets Groups Projects
Verified Commit 5aeb4763 authored by Ernesto Rico Schmidt's avatar Ernesto Rico Schmidt
Browse files

feat: add permissions to edit User Profile CBA username & user token fields

parent eecc3b65
No related branches found
No related tags found
No related merge requests found
# Generated by Django 4.2.13 on 2024-06-11 19:08
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("program", "0097_alter_host_options"),
]
operations = [
migrations.AlterModelOptions(
name="userprofile",
options={
"permissions": [
("edit__user_profile__cba_username", "Can edit CBA username field"),
("edit__user_profile__cba_user_token", "Can edit CBA user token field"),
]
},
),
]
......@@ -528,6 +528,12 @@ class UserProfile(models.Model):
updated_by = models.CharField(blank=True, default="", max_length=150)
user = models.OneToOneField(User, null=True, on_delete=models.SET_NULL, related_name="profile")
class Meta:
permissions = [
("edit__user_profile__cba_username", "Can edit CBA username field"),
("edit__user_profile__cba_user_token", "Can edit CBA user token field"),
]
def __str__(self):
return self.user.username
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment