Skip to content

Commit

Permalink
Merge pull request #18 from dimagi/deprecation
Browse files Browse the repository at this point in the history
explicit app labels
  • Loading branch information
dannyroberts committed Aug 28, 2015
2 parents e372a6d + 1e188f7 commit abecbe4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions django_prbac/models.py
Expand Up @@ -68,6 +68,8 @@ class Role(ValidatingModel, models.Model):
default=set,
)

class Meta:
app_label = 'django_prbac'

# Methods
# -------
Expand Down Expand Up @@ -211,6 +213,8 @@ class Grant(ValidatingModel, models.Model):
default=dict,
)

class Meta:
app_label = 'django_prbac'

# Methods
# -------
Expand Down Expand Up @@ -244,6 +248,9 @@ class UserRole(ValidatingModel, models.Model):
user = models.OneToOneField(settings.AUTH_USER_MODEL, related_name='prbac_role')
role = models.OneToOneField(Role, related_name='user_role')

class Meta:
app_label = 'django_prbac'

def has_privilege(self, privilege):
return self.role.has_privilege(privilege)

Expand Down

0 comments on commit abecbe4

Please sign in to comment.