Skip to content

Commit be7a8cc

Browse files
committed
Allow user-customisable page on permission denied instead of packaged template
1 parent 2962d9b commit be7a8cc

File tree

2 files changed

+1
-12
lines changed

2 files changed

+1
-12
lines changed

djangosaml2/templates/djangosaml2/permission_denied.html

Lines changed: 0 additions & 11 deletions
This file was deleted.

djangosaml2/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ def assertion_consumer_service(request,
255255
create_unknown_user=create_unknown_user)
256256
if user is None:
257257
logger.error('The user is None')
258-
return render(request, 'djangosaml2/permission_denied.html', status=403)
258+
raise PermissionDenied
259259

260260
auth.login(request, user)
261261
_set_subject_id(request.session, session_info['name_id'])

0 commit comments

Comments
 (0)