mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-10 03:49:24 +00:00
pedagogy: complete CRUD for UV model
This commit is contained in:
@ -44,8 +44,14 @@ class UV(models.Model):
|
||||
return user.is_in_group(settings.SITH_GROUP_PEDAGOGY_ADMIN_ID)
|
||||
|
||||
def can_be_viewed_by(self, user):
|
||||
"""
|
||||
Only visible by subscribers
|
||||
"""
|
||||
return user.is_subscribed
|
||||
|
||||
def __str__(self):
|
||||
return self.code
|
||||
|
||||
code = models.CharField(
|
||||
_("code"),
|
||||
max_length=10,
|
||||
|
Reference in New Issue
Block a user