soter/soter/factories.py

17 lines
404 B
Python

from pyramid.security import Allow, Authenticated
from soter.models.auth import Permission
class RootFactory(object):
@property
def __acl__(self):
acl = [
(Allow, Authenticated, 'Authenticated')]
for permission in Permission.list():
acl.append((Allow, permission.name, permission.name))
return acl
def __init__(self, request):
pass