diff options
author | ᴜɴᴋɴᴡᴏɴ <u@gogs.io> | 2020-04-05 06:36:08 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-05 06:36:08 +0800 |
commit | 07818d5fa5aef7dd7dca1d556f59c7a146a9b00c (patch) | |
tree | 14c89609a04f269123413f676a8cbe68c197de07 /internal/db | |
parent | bae1d6ccd81cd427382a2456e7c3646bdac9cf46 (diff) |
route: no session for routes without UI (#6066)
Not all routes need session, register session and CSRF middleware as global is a waste of resource, and creating a lot one-time off yet never used session records.
Diffstat (limited to 'internal/db')
-rw-r--r-- | internal/db/access.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/db/access.go b/internal/db/access.go index 551c29d7..5f9960af 100644 --- a/internal/db/access.go +++ b/internal/db/access.go @@ -93,7 +93,7 @@ func hasAccess(e Engine, userID int64, repo *Repository, testMode AccessMode) (b } // HasAccess returns true if someone has the request access level. User can be nil! -// Deprecated: Use Perms.HasAccess instead. +// Deprecated: Use Perms.Authorize instead. func HasAccess(userID int64, repo *Repository, testMode AccessMode) (bool, error) { return hasAccess(x, userID, repo, testMode) } |