mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-05-02 07:00:51 -04:00
Refactor user permissions to use args, not list
This makes the interface a bit cleaner and less verbose.
This commit is contained in:
@@ -71,7 +71,7 @@ def user_has_permissions(*permissions, admin_override=False, any_=False):
|
||||
def wrap_func(*args, **kwargs):
|
||||
if current_user and current_user.is_authenticated:
|
||||
if current_user.has_permissions(
|
||||
permissions=permissions,
|
||||
*permissions,
|
||||
admin_override=admin_override,
|
||||
any_=any_
|
||||
):
|
||||
|
||||
Reference in New Issue
Block a user