[manual] Define realm.administer permission

To apply this to your system, run:
    python manage.py update_permissions

A rebuilt database will already have the correct permission defined.

(imported from commit 5b826b940257e14b3e9e44f9c32b20ed0183dedf)
This commit is contained in:
Luke Faraone 2013-06-24 12:26:38 -07:00
parent 6988490980
commit ae03ff408b
1 changed files with 5 additions and 0 deletions

View File

@ -66,6 +66,11 @@ class Realm(models.Model):
def __str__(self):
return self.__repr__()
class Meta:
permissions = (
('administer', "Administer a realm"),
)
class UserProfile(AbstractBaseUser, PermissionsMixin):
# Fields from models.AbstractUser minus last_name and first_name,
# which we don't use; email is modified to make it indexed and unique.