def accessDecisionManager(self): """This AccessDecisionManager decides based on what ROLE_xxx the current user has.""" adm = AffirmativeBased() adm.allow_if_all_abstain = False adm.access_decision_voters = [] adm.access_decision_voters.append(RoleVoter()) return adm
def accessDecisionManager(self): adm = AffirmativeBased() adm.allow_if_all_abstain_decisions = False adm.access_decision_voters = [] adm.access_decision_voters.append(self.vetRoleVoter()) adm.access_decision_voters.append(self.customerRoleVoter()) adm.access_decision_voters.append(self.ownerVoter()) return adm