def _bill_create(info, context): utils.setParliamentId(info, context) user_id = model_utils.get_principal_id() if not user_id: user_id = "-" zope.securitypolicy.interfaces.IPrincipalRoleMap(context).assignRoleToPrincipal("bungeni.Owner", user_id) owner_id = utils.getOwnerId(context) if owner_id and (owner_id != user_id): zope.securitypolicy.interfaces.IPrincipalRoleMap(context).assignRoleToPrincipal("bungeni.Owner", owner_id)
def create( info, context ): user_id = get_principal_id() if not user_id: user_id ='-' zope.securitypolicy.interfaces.IPrincipalRoleMap( context ).assignRoleToPrincipal( u'bungeni.Owner', user_id) utils.setParliamentId(info, context) owner_id = utils.getOwnerId( context ) if owner_id and (owner_id != user_id): zope.securitypolicy.interfaces.IPrincipalRoleMap( context ).assignRoleToPrincipal( u'bungeni.Owner', owner_id)
def create(info, context): user_id = get_principal_id() if not user_id: user_id = '-' zope.securitypolicy.interfaces.IPrincipalRoleMap( context).assignRoleToPrincipal(u'bungeni.Owner', user_id) utils.setParliamentId(info, context) owner_id = utils.getOwnerId(context) if owner_id and (owner_id != user_id): zope.securitypolicy.interfaces.IPrincipalRoleMap( context).assignRoleToPrincipal(u'bungeni.Owner', owner_id)
def _bill_create(info, context): utils.setParliamentId(info, context) user_id = model_utils.get_principal_id() if not user_id: user_id = "-" zope.securitypolicy.interfaces.IPrincipalRoleMap( context).assignRoleToPrincipal("bungeni.Owner", user_id) owner_id = utils.getOwnerId(context) if owner_id and (owner_id != user_id): zope.securitypolicy.interfaces.IPrincipalRoleMap( context).assignRoleToPrincipal("bungeni.Owner", owner_id)
def _pi_create(info, context): utils.setParliamentId(info, context) # !+setParliamentId(mr, mar-2011) creating a question via UI does not # seem to need this, but... a question unit test fails without it! utils.assign_owner_role_pi(context)
def _pi_create(info, context): utils.setParliamentId(info, context) # !+setParliamentId(mr, mar-2011) creating a question via UI does not # seem to need this, but... a question unit test fails without it! utils.assign_owner_role_pi(context)
def create( info, context ): utils.setParliamentId(info, context) utils.setBungeniOwner(context)
def create(info, context): utils.setParliamentId(info, context) utils.setBungeniOwner(context)
def _tableddocument_create(info, context): utils.setParliamentId(info, context) utils.setBungeniOwner(context)
def _tableddocument_create(info, context): utils.setParliamentId(info, context) utils.setBungeniOwner(context)