Make document ACL's a constant
This makes it possible to refer to it in other modules.
Patch by: Sverre Rabbelier
--- a/app/soc/models/document.py Sat Feb 14 14:10:56 2009 +0000
+++ b/app/soc/models/document.py Sat Feb 14 14:11:18 2009 +0000
@@ -45,6 +45,7 @@
"""
URL_NAME = 'document'
+ DOCUMENT_ACCESS = ['admin', 'restricted', 'member', 'user']
#: field storing the prefix of this document
prefix = db.StringProperty(default='user', required=True,
@@ -56,7 +57,7 @@
#: field storing the required access to read this document
read_access = db.StringProperty(default='public', required=True,
- choices=['admin', 'restricted', 'member', 'user', 'public'],
+ choices=DOCUMENT_ACCESS + ['public'],
verbose_name=ugettext('Read Access'))
read_access.help_text = ugettext(
'Indicates the state of the document, '
@@ -64,7 +65,7 @@
#: field storing the required access to write to this document
write_access = db.StringProperty(default='admin', required=True,
- choices=['admin', 'restricted', 'member', 'user'],
+ choices=DOCUMENT_ACCESS,
verbose_name=ugettext('Write Access'))
write_access.help_text = ugettext(
'Indicates the state of the document, '