mirror of
https://github.com/ansible/awx.git
synced 2026-07-06 22:08:08 -02:30
Separate Inventory Source API vs RBAC testing
Introduced new decorator for patching an access method, does legwork of inserting into access registry so that tests that test the API can mock RBAC behavior.
This commit is contained in:
@@ -95,7 +95,7 @@ def check_user_access(user, model_class, action, *args, **kwargs):
|
||||
continue
|
||||
result = access_method(*args, **kwargs)
|
||||
logger.debug('%s.%s %r returned %r', access_instance.__class__.__name__,
|
||||
access_method.__name__, args, result)
|
||||
getattr(access_method, '__name__', 'unknown'), args, result)
|
||||
if result:
|
||||
return result
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user