MM-27572 permissions regression (#15215)
* Fix regression in HasPermissionToTeam * Removing unessisary special case + verify system admins always have permissions. * Fixing testing and bad cleanup.
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
8138600dd1
Коммит
4492549d80
@@ -148,7 +148,9 @@ func (a *App) HasPermissionToTeam(askingUserId string, teamId string, permission
|
||||
}
|
||||
teamMember, _ := a.GetTeamMember(teamId, askingUserId)
|
||||
if teamMember != nil && teamMember.DeleteAt == 0 {
|
||||
return a.RolesGrantPermission(teamMember.GetRoles(), permission.Id)
|
||||
if a.RolesGrantPermission(teamMember.GetRoles(), permission.Id) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return a.HasPermissionTo(askingUserId, permission)
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user