mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Always clear channel cache when scheme is deleted (#14989)
This commit is contained in:
@@ -287,11 +287,11 @@ func (s *SqlSchemeStore) Delete(schemeId string) (*model.Scheme, error) {
|
||||
if _, err := s.GetMaster().Exec("UPDATE Channels SET SchemeId = '' WHERE SchemeId = :SchemeId", map[string]interface{}{"SchemeId": schemeId}); err != nil {
|
||||
return nil, errors.Wrapf(err, "failed to update Channels with schemeId=%s", schemeId)
|
||||
}
|
||||
|
||||
// Blow away the channel caches.
|
||||
s.Channel().ClearCaches()
|
||||
}
|
||||
|
||||
// Blow away the channel caches.
|
||||
s.Channel().ClearCaches()
|
||||
|
||||
// Delete the roles belonging to the scheme.
|
||||
roleNames := []string{scheme.DefaultChannelGuestRole, scheme.DefaultChannelUserRole, scheme.DefaultChannelAdminRole}
|
||||
if scheme.Scope == model.SCHEME_SCOPE_TEAM {
|
||||
|
||||
Reference in New Issue
Block a user