mirror of
https://github.com/hrfee/jfa-go.git
synced 2026-01-18 16:47:42 +01:00
use different color library, wrap logger functions with it
This commit is contained in:
1
auth.go
1
auth.go
@@ -148,7 +148,6 @@ func (app *appContext) getTokenLogin(gc *gin.Context) {
|
||||
}
|
||||
jfID = user.ID
|
||||
if app.config.Section("ui").Key("admin_only").MustBool(true) {
|
||||
fmt.Printf("%+v\n", user.Policy)
|
||||
if !user.Policy.IsAdministrator {
|
||||
app.debug.Printf("Auth denied: Users \"%s\" isn't admin", creds[0])
|
||||
respond(401, "Unauthorized", gc)
|
||||
|
||||
Reference in New Issue
Block a user