mirror of
https://github.com/mattermost/mattermost.git
synced 2026-09-24 16:05:00 +08:00
Removing user cache clear from SessionHasPermissionsTo (#8625)
This commit is contained in:
committed by
Derrick Anderson
parent
bc49b12427
commit
a7fd13384b
@@ -12,12 +12,7 @@ import (
|
||||
)
|
||||
|
||||
func (a *App) SessionHasPermissionTo(session model.Session, permission *model.Permission) bool {
|
||||
if !a.RolesGrantPermission(session.GetUserRoles(), permission.Id) {
|
||||
a.ClearSessionCacheForUser(session.UserId)
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
return a.RolesGrantPermission(session.GetUserRoles(), permission.Id)
|
||||
}
|
||||
|
||||
/// DO NOT USE: LEGACY
|
||||
|
||||
Reference in New Issue
Block a user