mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Refactor "app/authorization.go" to use structured logging (#12233)
This commit is contained in:
committed by
Ben Schumacher
parent
c7b583ccdd
commit
be0d13578d
@@ -4,7 +4,6 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
@@ -192,8 +191,7 @@ func (a *App) RolesGrantPermission(roleNames []string, permissionId string) bool
|
||||
if err != nil {
|
||||
// This should only happen if something is very broken. We can't realistically
|
||||
// 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(fmt.Sprint(err))
|
||||
mlog.Error("Failed to get roles from database with role names: "+strings.Join(roleNames, ",")+" ", mlog.Err(err))
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user