Rewrite authorization as middleware #7
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I thought this was too complicated at first.
The first middleware should try to authenticate the user using the access token in the cookie. Request handlers should have a way to get the current user.
The second middleware is only for admin pages, it should abort the request if the user is not an admin.