mirror of
https://github.com/filebrowser/filebrowser.git
synced 2026-01-23 02:35:10 +00:00
feat: hook authentication method
This commit is contained in:
parent
f80b016ef0
commit
dda9a389f3
12 changed files with 340 additions and 14 deletions
|
|
@ -14,8 +14,8 @@ const MethodNoAuth settings.AuthMethod = "noauth"
|
|||
type NoAuth struct{}
|
||||
|
||||
// Auth uses authenticates user 1.
|
||||
func (a NoAuth) Auth(r *http.Request, sto users.Store, root string) (*users.User, error) {
|
||||
return sto.Get(root, uint(1))
|
||||
func (a NoAuth) Auth(r *http.Request, usr users.Store, stg *settings.Settings, srv *settings.Server) (*users.User, error) {
|
||||
return usr.Get(srv.Root, uint(1))
|
||||
}
|
||||
|
||||
// LoginPage tells that no auth doesn't require a login page.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue