Package bscw :: Package api :: Package blog :: Module ap_addblog
[hide private]

Module ap_addblog

add a new blog
   returns id of new blog

API definition:

  API = (
    ('target_id',    ASCII,    1),
    ('name',         UNICODE,  1),
    ('description',  UNICODE,  0),
    ('tags',         UNICODE,  0),
    ('read_access',  INT,      0),
    ('write_access', INT,      0),
  )

  read_access:
    2 - only members of the workspace (default)
    3 - only registered users of this BSCW server
    4 - anyone, including anonymous users

  write_access:
    1 - only myself (default)
    2 - only members of the workspace
    3 - only registered users of this BSCW server
    4 - anyone, including anonymous users


API definition::

 API = (('target_id', 'ASCII string', 1),
        ('name', 'Unicode string', 1),
        ('description', 'Unicode string', 0),
        ('tags', 'Unicode string', 0),
        ('read_access', 'int', 0),
        ('write_access', 'int', 0))

(c) Fraunhofer FIT, 2010


Version: $Rev: 20131 $

Functions [hide private]
 
param_def()
return the parameter definition
 
do_it(request, target_id, name, desc='', tags='', read_access=2, write_access=1)
see above
 
addblog(request, target, name, desc='', tags='', read_access=0, write_access=0)
 
set_access(blog, read_access, write_access)
 
append_act(actions, act)
 
remove_act(actions, act)
 
check_act(condition, actions, act)
 
check_role(obj, role, actions, events)
Variables [hide private]
  a_me_only = 1
  a_members_only = 2
  a_registered_users = 4
  a_anonymous_access = 8
  access_map = {0: 0, 1: 1, 2: 3, 3: 7, 4: 15}
  __package__ = None