From 06ec648cf30e3968c0fdb2514c8d59dff97c757c Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Tue, 31 Oct 2017 12:00:21 -0400 Subject: PLT-7978 Add websocket event for user role update (#7745) * Add websocket event for user role update * Fix tests * More test fixes --- api4/post_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'api4/post_test.go') diff --git a/api4/post_test.go b/api4/post_test.go index 6f195296a..15553137a 100644 --- a/api4/post_test.go +++ b/api4/post_test.go @@ -292,7 +292,7 @@ func TestCreatePostPublic(t *testing.T) { _, resp = Client.CreatePost(post) CheckForbiddenStatus(t, resp) - th.App.UpdateUserRoles(ruser.Id, model.ROLE_SYSTEM_USER.Id+" "+model.ROLE_SYSTEM_POST_ALL_PUBLIC.Id) + th.App.UpdateUserRoles(ruser.Id, model.ROLE_SYSTEM_USER.Id+" "+model.ROLE_SYSTEM_POST_ALL_PUBLIC.Id, false) th.App.InvalidateAllCaches() Client.Login(user.Email, user.Password) @@ -304,7 +304,7 @@ func TestCreatePostPublic(t *testing.T) { _, resp = Client.CreatePost(post) CheckForbiddenStatus(t, resp) - th.App.UpdateUserRoles(ruser.Id, model.ROLE_SYSTEM_USER.Id) + th.App.UpdateUserRoles(ruser.Id, model.ROLE_SYSTEM_USER.Id, false) th.App.JoinUserToTeam(th.BasicTeam, ruser, "") th.App.UpdateTeamMemberRoles(th.BasicTeam.Id, ruser.Id, model.ROLE_TEAM_USER.Id+" "+model.ROLE_TEAM_POST_ALL_PUBLIC.Id) th.App.InvalidateAllCaches() @@ -339,7 +339,7 @@ func TestCreatePostAll(t *testing.T) { _, resp = Client.CreatePost(post) CheckForbiddenStatus(t, resp) - th.App.UpdateUserRoles(ruser.Id, model.ROLE_SYSTEM_USER.Id+" "+model.ROLE_SYSTEM_POST_ALL.Id) + th.App.UpdateUserRoles(ruser.Id, model.ROLE_SYSTEM_USER.Id+" "+model.ROLE_SYSTEM_POST_ALL.Id, false) th.App.InvalidateAllCaches() Client.Login(user.Email, user.Password) @@ -355,7 +355,7 @@ func TestCreatePostAll(t *testing.T) { _, resp = Client.CreatePost(post) CheckNoError(t, resp) - th.App.UpdateUserRoles(ruser.Id, model.ROLE_SYSTEM_USER.Id) + th.App.UpdateUserRoles(ruser.Id, model.ROLE_SYSTEM_USER.Id, false) th.App.JoinUserToTeam(th.BasicTeam, ruser, "") th.App.UpdateTeamMemberRoles(th.BasicTeam.Id, ruser.Id, model.ROLE_TEAM_USER.Id+" "+model.ROLE_TEAM_POST_ALL.Id) th.App.InvalidateAllCaches() -- cgit v1.2.3-1-g7c22