first drop

This commit is contained in:
2015-02-13 02:29:37 +01:00
commit fa4a9859c5
532 changed files with 74098 additions and 0 deletions
+25
View File
@@ -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