diff options
author | Frederick Muriuki Muriithi | 2023-01-30 03:51:01 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2023-01-30 03:51:01 +0300 |
commit | a523a767aecb7f1ced67788eda289f0d6c8e30fd (patch) | |
tree | fe7cb31328c235b21495189c640a69c3a90059c4 /gn3/auth/authorisation/roles.py | |
parent | 920648f55475ad706828f696141dcd07edb1ef73 (diff) | |
download | genenetwork3-a523a767aecb7f1ced67788eda289f0d6c8e30fd.tar.gz |
auth: Do not treat not finding a group as an error
Stop treating not finding a group for a user as an error, since that is an
actual expected state in the system at some point. Rather, restore the use of
Maybe rather than using Either.
We can raise the NotFoundError at the API level rather than at database
retrival level.
Diffstat (limited to 'gn3/auth/authorisation/roles.py')
-rw-r--r-- | gn3/auth/authorisation/roles.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gn3/auth/authorisation/roles.py b/gn3/auth/authorisation/roles.py index 23b74cc..f3b2f90 100644 --- a/gn3/auth/authorisation/roles.py +++ b/gn3/auth/authorisation/roles.py @@ -13,7 +13,7 @@ from gn3.auth.authentication.checks import authenticated_p from .checks import authorised_p from .privileges import Privilege -from .errors import NotFoundError, AuthorisationError +from .errors import NotFoundError class Role(NamedTuple): """Class representing a role: creates immutable objects.""" |