Set the PermissionDenied's detail text

This commit is contained in:
PapaTutuWawa 2021-02-05 17:00:19 +01:00
parent e749eec5ff
commit b95662df1e

View File

@ -80,7 +80,7 @@ class LDAPConnection:
def is_user_in_ldap(user: UserType = Depends(get_authenticated_user)):
if not LDAPConnection.get_instance().has_user(user.username):
raise PermissionDenied("User not in LDAP directory.")
raise PermissionDenied(detail="User not in LDAP directory.")
def create_user(context: CallbackContext, *args, **kwargs):
"""