Refactor "app/authorization.go" to use structured logging (#12233)
Этот коммит содержится в:
коммит произвёл
Ben Schumacher
родитель
c7b583ccdd
Коммит
be0d13578d
@@ -4,7 +4,6 @@
|
|||||||
package app
|
package app
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
@@ -192,8 +191,7 @@ func (a *App) RolesGrantPermission(roleNames []string, permissionId string) bool
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
// This should only happen if something is very broken. We can't realistically
|
// This should only happen if something is very broken. We can't realistically
|
||||||
// recover the situation, so deny permission and log an error.
|
// recover the situation, so deny permission and log an error.
|
||||||
mlog.Error("Failed to get roles from database with role names: " + strings.Join(roleNames, ","))
|
mlog.Error("Failed to get roles from database with role names: "+strings.Join(roleNames, ",")+" ", mlog.Err(err))
|
||||||
mlog.Error(fmt.Sprint(err))
|
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user