Skip to content

Commit

Permalink
Remove viewer users
Browse files Browse the repository at this point in the history
  • Loading branch information
rowanseymour committed Jan 9, 2025
1 parent 5049025 commit b48e715
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 8 deletions.
2 changes: 0 additions & 2 deletions core/models/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ type UserRole string
const (
UserRoleAdministrator UserRole = "A"
UserRoleEditor UserRole = "E"
UserRoleViewer UserRole = "V"
UserRoleAgent UserRole = "T"
UserRoleSurveyor UserRole = "S"
)

// User is our type for a user asset
Expand Down
1 change: 0 additions & 1 deletion core/models/users_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ func TestLoadUsers(t *testing.T) {
{id: testdata.Admin.ID, email: testdata.Admin.Email, name: "Andy Admin", role: models.UserRoleAdministrator, team: nil},
{id: testdata.Agent.ID, email: testdata.Agent.Email, name: "Ann D'Agent", role: models.UserRoleAgent, team: partners},
{id: testdata.Editor.ID, email: testdata.Editor.Email, name: "Ed McEditor", role: models.UserRoleEditor, team: nil},
{id: testdata.Viewer.ID, email: testdata.Viewer.Email, name: "Veronica Views", role: models.UserRoleViewer, team: nil},
}

require.Equal(t, len(expectedUsers), len(users))
Expand Down
3 changes: 1 addition & 2 deletions testsuite/testdata/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ var AuthGroupIDs = map[string]int{
var Org1 = &Org{1, "bf0514a5-9407-44c9-b0f9-3f36f9c18414"}
var Admin = &User{3, "[email protected]"}
var Editor = &User{4, "[email protected]"}
var Viewer = &User{5, "[email protected]"}
var Agent = &User{6, "[email protected]"}
var Agent = &User{5, "[email protected]"}

var TwilioChannel = &Channel{10000, "74729f45-7f29-4868-9dc4-90e491e3c7d8", "T"}
var VonageChannel = &Channel{10001, "19012bfd-3ce3-4cae-9bb9-76cf92c73d49", "NX"}
Expand Down
Binary file modified testsuite/testfiles/postgres.dump
Binary file not shown.
2 changes: 1 addition & 1 deletion web/msg/testdata/send.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
"path": "/mr/msg/send",
"body": {
"org_id": 1,
"user_id": 6,
"user_id": 5,
"contact_id": 10000,
"text": "we can help",
"ticket_id": $cathy_ticket_id$
Expand Down
4 changes: 2 additions & 2 deletions web/ticket/testdata/assign.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
2,
3
],
"assignee_id": 6
"assignee_id": 5
},
"status": 200,
"response": {
Expand All @@ -22,7 +22,7 @@
},
"db_assertions": [
{
"query": "SELECT count(*) FROM tickets_ticket WHERE assignee_id = 6",
"query": "SELECT count(*) FROM tickets_ticket WHERE assignee_id = 5",
"count": 3
},
{
Expand Down

0 comments on commit b48e715

Please sign in to comment.