Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: return project roles #8314

Merged
merged 3 commits into from
Oct 1, 2024
Merged

Conversation

thomasheartman
Copy link
Contributor

This PR updates the personal dashboard project endpoint to return owners and roles. It also adds the impl for getting roles (via the access store).

I'm filtering the roles for a project to only include project roles for now, but we might wanna change this later.

Tests and UI update will follow.

Copy link

vercel bot commented Oct 1, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
unleash-docs ⬜️ Ignored (Inspect) Visit Preview Oct 1, 2024 9:10am
unleash-monorepo-frontend ⬜️ Ignored (Inspect) Visit Preview Oct 1, 2024 9:10am

Copy link
Contributor

github-actions bot commented Oct 1, 2024

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Manifest Files

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This file doesn't live where I expected it to. It also didn't expose the class as a named export (so the fact that it was mismatched didn't really matter much). Should we move it or leave it where it is?

Copy link
Contributor

Choose a reason for hiding this comment

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

Access subdomain has not been fully moved to feature oriented architecture yet. I remember moving only the composition root because this was all I needed at that time to finish some other big migration. We can finish the migration (depending how much you're inclined to do it) to full feature oriented architecture but not in this PR :)

@@ -117,11 +123,24 @@ export class PersonalDashboardService {
const owners =
await this.projectOwnersReadModel.getProjectOwners(projectId);

const allRoles = await this.accessStore.getAllProjectRolesForUser(
Copy link
Contributor

Choose a reason for hiding this comment

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

in the next PR we can Promise.all all those async operations

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, yeah. Actually lemme do it right away, while I'm in that context.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nah, I'll do it in a follow-up after all. Think it's better served that way

@thomasheartman thomasheartman force-pushed the feat/1-2909-return-project-roles branch from 4f8db19 to 8fcaa12 Compare October 1, 2024 09:10
@thomasheartman thomasheartman enabled auto-merge (squash) October 1, 2024 09:10
@thomasheartman thomasheartman merged commit 96d8dc3 into main Oct 1, 2024
7 checks passed
@thomasheartman thomasheartman deleted the feat/1-2909-return-project-roles branch October 1, 2024 09:14
thomasheartman added a commit that referenced this pull request Oct 2, 2024
This PR follows up on a comment made in
#8314 and groups sequential
awaited calls into a single Promise.all instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants