summaryrefslogtreecommitdiffstats
path: root/app/channel.go
diff options
context:
space:
mode:
Diffstat (limited to 'app/channel.go')
-rw-r--r--app/channel.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/channel.go b/app/channel.go
index 49a797f15..eadb94c2f 100644
--- a/app/channel.go
+++ b/app/channel.go
@@ -439,6 +439,10 @@ func (a *App) UpdateChannelMemberRoles(channelId string, userId string, newRoles
return nil, err
}
+ if err := a.CheckRolesExist(strings.Fields(newRoles)); err != nil {
+ return nil, err
+ }
+
member.Roles = newRoles
if result := <-a.Srv.Store.Channel().UpdateMember(member); result.Err != nil {