Skip to content

Commit

Permalink
admin path corrected
Browse files Browse the repository at this point in the history
  • Loading branch information
RajatGupta02 committed Apr 15, 2023
1 parent 8c3d9ee commit c12d2e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/yearbook/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
USER_MODEL = User

# An array of path regexes that will not be processed by the middleware
PUBLIC_PATHS = ['^/public.*','^/$','^/static.*','^/admin$', '^/media.*']
PUBLIC_PATHS = ['^/public.*','^/$','^/static.*','^/admin', '^/media.*']

# A dictionary of path regexes mapping to the roles. A user needs to have all roles in order to be authorized
ROLES = {
Expand Down Expand Up @@ -88,7 +88,7 @@ def __call__(self, request):
# logging.info("line 88")
return UNAUTHORIZED_HANDLER(request)
self.assign_user(request, decoded['user'])
# logging.info("user assigned")
logging.info("user assigned")

except Exception as err:
# print(err)
Expand Down

0 comments on commit c12d2e0

Please sign in to comment.