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)
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)
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)