Skip to content

Permissions #92

Merged
3mcd merged 27 commits into
mainfrom
qdt/permissions
Sep 19, 2023
Merged

Permissions #92
3mcd merged 27 commits into
mainfrom
qdt/permissions

Conversation

@qweliant
Copy link
Copy Markdown
Contributor

@qweliant qweliant commented Sep 12, 2023

Issue(s) Resolved

Resolves #87
Resolves #85
Resolves #86

Test Plan

Visit stages. Be sure they can only move to places that are listed in the seed file.
Reference the seed file to check constraints for user claims as well.
Not Jill though. Jill can do everything

Screenshots (if applicable)

Screencast.from.09-18-2023.04.54.44.PM.webm
Screencast.from.09-18-2023.04.58.23.PM.webm

Optional

Notes/Context/Gotchas

I used two patterns listed in nextjs docs on routing and project structure. Shared components between routes live in the root of core in components. components used exclusively in routes live in components.

Supporting Docs

@isTravis isTravis temporarily deployed to qdt/permissions - core PR #92 September 14, 2023 21:35 — with Render Destroyed
@isTravis isTravis temporarily deployed to qdt/permissions - integration-submissions PR #92 September 14, 2023 21:35 — with Render Destroyed
@isTravis isTravis temporarily deployed to qdt/permissions - core PR #92 September 14, 2023 21:38 — with Render Destroyed
@isTravis isTravis temporarily deployed to qdt/permissions - integration-submissions PR #92 September 14, 2023 21:38 — with Render Destroyed
stole erics version of this
Copy link
Copy Markdown
Collaborator

@3mcd 3mcd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few more tweaks and this will be good to go

Comment thread core/app/c/[communitySlug]/stages/components/Move.tsx Outdated
Comment thread core/app/c/[communitySlug]/stages/components/StageList.tsx Outdated
Comment thread core/app/components/PubRow.tsx Outdated
@isTravis isTravis temporarily deployed to qdt/permissions - integration-submissions PR #92 September 19, 2023 18:04 — with Render Destroyed
@isTravis isTravis temporarily deployed to qdt/permissions - core PR #92 September 19, 2023 18:11 — with Render Destroyed
@isTravis isTravis temporarily deployed to qdt/permissions - integration-submissions PR #92 September 19, 2023 18:11 — with Render Destroyed
Comment thread core/lib/permissions.ts
} else {
throw new Error("Invalid permission");
}
}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just gets the permissions for each stage

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i split out pub row

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

split out integration button actions

Comment on lines +24 to +31
<Move pub={props.pub} stage={props.stage} stages={props.stages} />
<Assign
pub={props.pub}
loginData={props.loginData}
stage={props.stage}
stages={props.stages}
users={props.users}
/>
Copy link
Copy Markdown
Contributor Author

@qweliant qweliant Sep 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

split out these actions into two buttons

Comment on lines +16 to +17
const users = getPubUsers(stage.permissions);
const destinations = stage.moveConstraints.map((stage) => stage.destination);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gets users that can act on stages and stages that can be moved to

@qweliant qweliant requested a review from 3mcd September 19, 2023 18:18
@3mcd 3mcd merged commit 7a44751 into main Sep 19, 2023
@3mcd 3mcd deleted the qdt/permissions branch September 19, 2023 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants