app/soc/models/document.py
changeset 1095 0122dc66e5d2
parent 1091 0e648c690bb7
child 1134 493e7b5d3ab2
--- a/app/soc/models/document.py	Fri Jan 30 22:00:49 2009 +0000
+++ b/app/soc/models/document.py	Fri Jan 30 22:01:27 2009 +0000
@@ -46,6 +46,34 @@
 
   URL_NAME = 'document'
 
+  #: field storing the prefix of this document
+  prefix = db.StringProperty(default='user',
+      choices=['site','sponsor','program', 'club', 'organization', 'user'],
+      verbose_name=ugettext('Prefix'))
+  prefix.help_text = ugettext(
+      'Indicates the prefix of the document,'
+      ' determines which access scheme is used.')
+
+  #: field storing the access status of this document
+  # wiki = any user can read and write the document
+  # public = any user can read, only restricted can write
+  # member = member can read, only restricted can write
+  # restricted = restricted can read, only admin can write
+  # admin = admin can read, only admin can write
+  #
+  # example meanings for an organisations:
+  # admin = ['org_admin']
+  # restricted = ['org_admin', 'org_mentor']
+  # member = ['org_admin', 'org_mentor', 'org_student']
+  # public = anyone
+  # wiki = anyone
+  access_status = db.StringProperty(default='restricted', required=True,
+      choices=['admin','restricted', 'member', 'public', 'wiki'],
+      verbose_name=ugettext('Access type'))
+  access_status.help_text = ugettext(
+      'Indicates the state of the document, '
+      'determines the access scheme.')
+
   #: field storing whether a link to the Document should be featured in
   #: the sidebar menu (and possibly elsewhere); FAQs, Terms of Service,
   #: and the like are examples of "featured" Document