Organization: You can now update the organization user role directly (without removing and readding the organization user). Closes #1899
This commit is contained in:
@@ -80,6 +80,19 @@ func TestAccountDataAccess(t *testing.T) {
|
||||
So(err, ShouldBeNil)
|
||||
})
|
||||
|
||||
Convey("Can update org user role", func() {
|
||||
updateCmd := m.UpdateOrgUserCommand{OrgId: ac1.OrgId, UserId: ac2.Id, Role: m.ROLE_ADMIN}
|
||||
err = UpdateOrgUser(&updateCmd)
|
||||
So(err, ShouldBeNil)
|
||||
|
||||
orgUsersQuery := m.GetOrgUsersQuery{OrgId: ac1.OrgId}
|
||||
err = GetOrgUsers(&orgUsersQuery)
|
||||
So(err, ShouldBeNil)
|
||||
|
||||
So(orgUsersQuery.Result[1].Role, ShouldEqual, m.ROLE_ADMIN)
|
||||
|
||||
})
|
||||
|
||||
Convey("Can get logged in user projection", func() {
|
||||
query := m.GetSignedInUserQuery{UserId: ac2.Id}
|
||||
err := GetSignedInUser(&query)
|
||||
|
||||
Reference in New Issue
Block a user