halfapi/tests/dummy_domain/acl.py

20 lines
359 B
Python
Raw Normal View History

from halfapi.lib import acl
from halfapi.lib.acl import public
from random import randint
2021-12-06 08:29:21 +01:00
def random(*args):
""" Random access ACL
"""
return randint(0,1) == 1
2021-12-06 08:29:21 +01:00
def denied(*args):
""" Access denied
"""
return False
ACLS = (
('public', public.__doc__, 999),
('random', random.__doc__, 10),
('denied', denied.__doc__, 0)
)