Skip to content

Commit

Permalink
Make Bob (EF 1.1 SuperUser) super-user of "EF 1" & "LNG"
Browse files Browse the repository at this point in the history
Remove super-user assignment from "EF 2.2 Final Reviewer"
  • Loading branch information
midmarch committed Mar 8, 2023
1 parent 11833bc commit c8b3807
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions client/tests/e2e/permissions.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,11 @@ test.serial("checking super user permissions", async t => {

await t.context.logout()

await t.context.get("/", "jacob")
await t.context.get("/", "bob")
const $ownOrgPositionLink = await getFromSearchResults(
t,
"EF 2.2 Final Reviewer",
"EF 2.2 Final Reviewer",
"EF 1.1 SuperUser",
"EF 1.1 SuperUser",
"positions"
)
await $ownOrgPositionLink.click()
Expand All @@ -141,10 +141,10 @@ validateUserCannotEditOtherUser(

validateUserCannotEditOtherUser(
"super user cannot edit people from the organizations their position is not administrating",
"jacob",
"rebecca",
"CTR BECCABON, Rebecca",
"EF 2.2 Final Reviewer"
"bob",
"lin",
"CIV GUIST, Lin",
"Position LNG Advisor A"
)

test.serial("checking regular user permissions", async t => {
Expand Down
4 changes: 2 additions & 2 deletions insertBaseData-psql.sql
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,8 @@ UPDATE positions SET "organizationUuid" = (SELECT uuid FROM organizations WHERE
INSERT INTO "organizationAdministrativePositions" ("organizationUuid", "positionUuid")
VALUES
((SELECT uuid FROM organizations WHERE "shortName" = 'EF 2.1'), (SELECT uuid FROM positions WHERE name = 'EF 2.1 SuperUser')),
((SELECT uuid FROM organizations WHERE "shortName" = 'EF 2.2'), (SELECT uuid FROM positions WHERE name = 'EF 2.2 Final Reviewer'));

((SELECT uuid FROM organizations WHERE "shortName" = 'EF 2.2'), (SELECT uuid FROM positions WHERE name = 'EF 2.2 Final Reviewer')),
((SELECT uuid FROM organizations WHERE "shortName" = 'LNG'), (SELECT uuid FROM positions WHERE name = 'EF 1.1 SuperUser'));

-- Create the EF 1.1 approval process
INSERT INTO "approvalSteps" (uuid, "relatedObjectUuid", name, type)
Expand Down

0 comments on commit c8b3807

Please sign in to comment.