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: read logs and update cors maintenance root-role permissions #8996

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Tymek
Copy link
Member

@Tymek Tymek commented Dec 18, 2024

About the changes

Closes #

Important files

Discussion points

Copy link

vercel bot commented Dec 18, 2024

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

Name Status Preview Comments Updated (UTC)
unleash-monorepo-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 20, 2024 1:51pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
unleash-docs ⬜️ Ignored (Inspect) Visit Preview Dec 20, 2024 1:51pm

Copy link
Contributor

github-actions bot commented Dec 18, 2024

Dependency Review

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

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Files

@Tymek Tymek force-pushed the feat/more-maintenance-permissions branch from 343a857 to f8a62ef Compare December 19, 2024 17:42
Copy link
Contributor

@Tymek, core features have been modified in this pull request. Please review carefully!

Comment on lines +222 to 245
async setCors(
req: IAuthRequest<void, void, SetCorsSchema>,
res: Response<string>,
): Promise<void> {
const granularAdminPermissions = this.flagResolver.isEnabled(
'granularAdminPermissions',
);

if (!granularAdminPermissions) {
throw new NotFoundError();
}

if (req.body.frontendApiOrigins) {
await this.frontendApiService.setFrontendCorsSettings(
req.body.frontendApiOrigins,
req.audit,
);
res.sendStatus(204);
return;
}

throw new NotFoundError();
}
}
Copy link
Member Author

Choose a reason for hiding this comment

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

Previous "setUiConfig" is a generic name, but it only sets CORS. For easy transition into endpoint with proper permissions it's easier to create new one, and avoid potential errors or confusion about permissions in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

1 participant