MM-53098 Fix for checking bot and user permissions on shared endpoints (#23751)
* temp commit * update test to allow bot creation * add bot check to updateUser and deleteUser * add more unit tests * lint fixes * lint fix * update based on doc * add more unit tests * lint fixes * fix unit tests * fix unit tests --------- Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
2abcdfe76a
Коммит
30140c0a27
@@ -106,6 +106,7 @@ func TestCreateBot(t *testing.T) {
|
||||
|
||||
th.App.UpdateConfig(func(cfg *model.Config) { *cfg.ServiceSettings.EnableUserAccessTokens = true })
|
||||
th.AddPermissionToRole(model.PermissionCreateBot.Id, model.TeamUserRoleId)
|
||||
th.AddPermissionToRole(model.PermissionManageBots.Id, model.TeamUserRoleId)
|
||||
th.AddPermissionToRole(model.PermissionEditOtherUsers.Id, model.TeamUserRoleId)
|
||||
th.App.UpdateUserRoles(th.Context, th.BasicUser.Id, model.TeamUserRoleId+" "+model.SystemUserAccessTokenRoleId, false)
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user