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

fix(resource-recorder): check project permission by project id #1839

Merged
merged 5 commits into from
Jul 25, 2024

Conversation

jonaro00
Copy link
Member

@jonaro00 jonaro00 commented Jul 24, 2024

Description of change

  • allow checking project endpoint with the project id. this simplifies and corrects the check in r-r for project permission.

How has this been tested? (if applicable)

tested on staging

@jonaro00 jonaro00 requested a review from oddgrd July 25, 2024 10:11
let scope = match Path::<Ulid>::from_request_parts(parts, state).await {
Ok(Path(ulid)) => {
let p = service.find_project_by_id(&ulid.to_string()).await?;
ProjectName::new(&p.name).expect("valid project name")
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we mapp to invalidprojectname err instead?

Copy link
Member Author

Choose a reason for hiding this comment

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

Would rather have an internal error than a user facing one here. It should be safe regardless since the name is coming out of the db.

@jonaro00 jonaro00 merged commit 4b7f3fc into main Jul 25, 2024
31 of 33 checks passed
@jonaro00 jonaro00 deleted the fix/teams-res-rec-perm branch July 25, 2024 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants