mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
add User.is_elevated()
This one returns true if the user is either a Trusted User or a Developer. Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
b59601a8b7
commit
c006386079
2 changed files with 14 additions and 0 deletions
|
@ -214,6 +214,11 @@ def test_user_credential_types():
|
|||
assert aurweb.auth.developer(user)
|
||||
assert aurweb.auth.trusted_user_or_dev(user)
|
||||
|
||||
# Some model authorization checks.
|
||||
assert user.is_elevated()
|
||||
assert user.is_trusted_user()
|
||||
assert user.is_developer()
|
||||
|
||||
|
||||
def test_user_json():
|
||||
data = json.loads(user.json())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue