first drop
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
# -*- coding: utf8 -*-
|
||||
from pyramid.security import Allow, Everyone, Authenticated
|
||||
|
||||
USERS = { 1:'editor',
|
||||
'editor':'editor',
|
||||
'viewer':'viewer'}
|
||||
GROUPS = {'editor':['group:editors'], 1:['group:editors']}
|
||||
|
||||
def groupfinder(userid, request):
|
||||
if userid in USERS:
|
||||
return GROUPS.get(userid, [])
|
||||
|
||||
class EntryFactory(object):
|
||||
__acl__ = [(Allow, Everyone, 'view'),
|
||||
(Allow, Authenticated, 'create'),
|
||||
(Allow, Authenticated, 'edit'), ]
|
||||
|
||||
def __init__(self, request):
|
||||
pass
|
||||
|
||||
class RootFactory(object):
|
||||
__acl__ = [ (Allow, Everyone, 'view'),
|
||||
(Allow, 'group:editors', 'edit') ]
|
||||
def __init__(self, request):
|
||||
pass
|
||||
Reference in New Issue
Block a user