示例#1
0
def _event_private(context):
    """
    Assigns owner role to event creator - Limit viewing to owner
    """
    login = utils.get_principal_id()
    if login is not None:
        utils.assign_owner_role(context, login)
示例#2
0
def _group_draft(context):
    user_login = utils.get_principal_id()
    if user_login:
        utils.assign_owner_role(context, user_login)
    def _deactivate(context):
        utils.unset_group_local_role(context)
    _deactivate(context)
示例#3
0
def _event_private(context):
    """
    Assigns owner role to event creator - Limit viewing to owner
    """
    login = utils.get_principal_id()
    if login is not None:
        utils.assign_owner_role(context, login)
示例#4
0
def _group_draft(context):
    user_login = utils.get_principal_id()
    if user_login:
        utils.assign_owner_role(context, user_login)
    def _deactivate(context):
        utils.unset_group_local_role(context)
    _deactivate(context)
示例#5
0
def _address_private(context):
    # !+OWNER_ADDRESS(mr, mov-2010) is this logic correct, also for admin?
    try:
        user_login = dbutils.get_user(context.user_id).login
    except AttributeError:
        # 'GroupAddress' object has no attribute 'user_id'
        user_login = utils.get_principal_id()
    if user_login:
        utils.assign_owner_role(context, user_login)
示例#6
0
def _address_private(context):
    # !+OWNER_ADDRESS(mr, mov-2010) is this logic correct, also for admin?
    try:
        user_login = dbutils.get_user(context.user_id).login
    except AttributeError:
        # 'GroupAddress' object has no attribute 'user_id'
        user_login = utils.get_principal_id()
    if user_login:
        utils.assign_owner_role(context, user_login)