# HG changeset patch # User Sverre Rabbelier # Date 1234620678 0 # Node ID a3f654f30fbc00996dda7120aa962d0e202f8cc8 # Parent ba51a0cd311d7da22cc742f63b8abdc7ceff7f80 Make document ACL's a constant This makes it possible to refer to it in other modules. Patch by: Sverre Rabbelier diff -r ba51a0cd311d -r a3f654f30fbc app/soc/models/document.py --- 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, '