mirror of
				https://gitlab.crans.org/bde/nk20
				synced 2025-11-04 01:12:08 +01:00 
			
		
		
		
	Merge remote-tracking branch 'origin/rights' into rights
This commit is contained in:
		@@ -21,7 +21,7 @@ class PermissionBackend(object):
 | 
			
		||||
    def has_perm(self, user_obj, perm, obj=None):
 | 
			
		||||
        if obj is None:
 | 
			
		||||
            return False
 | 
			
		||||
        perm = perm.split('_')
 | 
			
		||||
        perm = perm.split('_', 3)
 | 
			
		||||
        perm_type = perm[1]
 | 
			
		||||
        perm_field = perm[2] if len(perm) == 3 else None
 | 
			
		||||
        return any(permission.applies(obj, perm_type, perm_field) for obj in self.permissions(user_obj, obj))
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user