You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+6-4Lines changed: 6 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,16 +4,18 @@ All notable changes to this project will be documented in this file. For commit
4
4
5
5
## v0.7.8-beta
6
6
7
+
Note: if using oidc, please update from 0.7.7 to resolve invalid_grant issue. Also - oidc no longer creates users automatically by default -- must be enabled.
7
8
8
9
**New Features**:
9
-
-
10
-
11
-
**Notes**:
12
-
-
10
+
- More oidc user creation options https://github.com/gtsteffaniak/filebrowser/issues/685
11
+
-`auth.methods.oidc.createUser` must be true to automatically create user, defaults to false.
12
+
-`auth.methods.oidc.adminGroup` allows using oidc provider group name to enable admin user creation.
13
13
14
14
**BugFixes**:
15
15
- fix save editor info sometimes saves wrong file. https://github.com/gtsteffaniak/filebrowser/issues/701
16
16
- make ctrl select work on mac or windows. https://github.com/gtsteffaniak/filebrowser/issues/739
17
+
- oidc login failures introduced in 0.7.6 https://github.com/gtsteffaniak/filebrowser/issues/731
Copy file name to clipboardExpand all lines: backend/common/settings/auth.go
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -60,6 +60,8 @@ type OidcConfig struct {
60
60
UserIdentifierstring`json:"userIdentifier"`// the user identifier to use for authentication. Default is "username", can be "email" or "username", or "phone"
61
61
DisableVerifyTLSbool`json:"disableVerifyTLS"`// disable TLS verification for the OIDC provider. This is insecure and should only be used for testing.
62
62
LogoutRedirectUrlstring`json:"logoutRedirectUrl"`// if provider logout url is provided, filebrowser will also redirect to logout url. Custom logout query params are respected.
63
+
CreateUserbool`json:"createUser"`// create user if not exists
64
+
AdminGroupstring`json:"adminGroup"`// if set, users in this group will be granted admin privileges.
// Retrieve the user from the store and store it in the context
218
228
user, err:=store.Users.Get(username)
219
229
iferr!=nil {
220
230
iferr.Error() !="the resource does not exist" {
221
231
returnhttp.StatusInternalServerError, err
222
232
}
223
-
224
-
err=storage.CreateUser(users.User{
225
-
LoginMethod: users.LoginMethodOidc,
226
-
Username: username,
227
-
}, false)
228
-
iferr!=nil {
229
-
returnhttp.StatusInternalServerError, err
230
-
}
231
-
user, err=store.Users.Get(username)
232
-
iferr!=nil {
233
-
returnhttp.StatusInternalServerError, err
233
+
ifconfig.Auth.Methods.OidcAuth.CreateUser {
234
+
err=storage.CreateUser(users.User{
235
+
LoginMethod: users.LoginMethodOidc,
236
+
Username: username,
237
+
}, isAdmin)
238
+
iferr!=nil {
239
+
returnhttp.StatusInternalServerError, err
240
+
}
241
+
user, err=store.Users.Get(username)
242
+
iferr!=nil {
243
+
returnhttp.StatusInternalServerError, err
244
+
}
245
+
} else {
246
+
returnhttp.StatusForbidden, fmt.Errorf("user %s does not exist and createUser is disabled. Your admin needs to create your user before you can access this application", username)
0 commit comments