From b95662df1e49b3f919be5310808b32134ab19637 Mon Sep 17 00:00:00 2001 From: Alexander PapaTutuWawa Date: Fri, 5 Feb 2021 17:00:19 +0100 Subject: [PATCH] Set the PermissionDenied's detail text --- myauth/ldap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/myauth/ldap.py b/myauth/ldap.py index a79c4af..a96860d 100644 --- a/myauth/ldap.py +++ b/myauth/ldap.py @@ -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): """