Add user helper method
This commit is contained in:
parent
0bef8fe570
commit
3f313ddb12
|
|
@ -0,0 +1,17 @@
|
|||
# Generated by Django 2.2.19 on 2021-04-14 21:16
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('users', '0026_auto_20210324_2126'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name='team',
|
||||
options={'verbose_name': 'Team', 'verbose_name_plural': 'Teams'},
|
||||
),
|
||||
]
|
||||
|
|
@ -106,6 +106,10 @@ class User(AbstractUser):
|
|||
user_settings.selected_class = school_class
|
||||
user_settings.save()
|
||||
|
||||
@property
|
||||
def can_manage_school_class_content(self):
|
||||
return self.has_perm('users.can_manage_school_class_content')
|
||||
|
||||
@property
|
||||
def full_name(self):
|
||||
return self.get_full_name()
|
||||
|
|
|
|||
Loading…
Reference in New Issue