mirror of
https://github.com/jazzband/django-authority.git
synced 2026-03-16 22:20:28 +00:00
Updated example permission to follow new-ish registry layout
This commit is contained in:
parent
210c0e032b
commit
494649b1d4
1 changed files with 4 additions and 3 deletions
|
|
@ -1,9 +1,10 @@
|
|||
from django.contrib.flatpages.models import FlatPage
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from authority import permissions
|
||||
import authority
|
||||
from authority.permissions import BasePermission
|
||||
|
||||
class FlatPagePermission(permissions.BasePermission):
|
||||
class FlatPagePermission(BasePermission):
|
||||
"""
|
||||
This class contains a bunch of checks:
|
||||
|
||||
|
|
@ -48,4 +49,4 @@ class FlatPagePermission(permissions.BasePermission):
|
|||
return False
|
||||
top_secret.short_description=_('Is allowed to see top secret flatpages')
|
||||
|
||||
permissions.register(FlatPage, FlatPagePermission)
|
||||
authority.register(FlatPage, FlatPagePermission)
|
||||
|
|
|
|||
Loading…
Reference in a new issue