As at present, the needs of the combined permission are checked using OR. Quoting from the documentation :
flask_principal. (* needs)
,
AND Permission allows, , :
class RequiresAll(Permission):
def allows(self, identity):
if not has_all(self.needs, identity.provides):
return False
if self.excludes and self.excludes.intersection(identity.provides):
return False
return True
def has_all(needed=None, provided=None):
if needed is None:
return True
if provided is None:
provided = set()
shared = needed.intersection(provided)
return shared == needed