Aggregate permissions

Pluggable applications can aggregate permissions to others using Permission._aggregate() method. For example:

# Define the permissions as usualclass FirmwarePermission(Permission):
def getfirmware(self, obj, cls,user):
if obj isnotNone:
return obj.group.has_roles(user, roles=['group_admin','node_admin'])returnFalse# register
Node.has_permission._aggregate(FirmwarePermission())# now you can use it as usual:
node.has_permission.getfirmware(user)

Permission backend

Also this permissions are supported through a Django compliant authentication backend defined at users.backends.TestbedPermissionBackend. Therefore User instances support queries like: