Apply security policy to auth controller#2084
Merged
MarceloRGonc merged 2 commits intomainfrom Mar 9, 2026
Merged
Conversation
|
Contributor
There was a problem hiding this comment.
Pull request overview
Adds route-level security metadata to authentication endpoints (OPS-3876), introducing an explicit analytics permission and attaching scoped route policies to auth/analytics routes.
Changes:
- Add new shared permission
Permission.WRITE_ANALYTICS. - Attach project-scoped route security policies (with analytics permission) to analytics auth endpoints.
- Attach an organization-scoped route security policy (with user write permission) to the sign-up endpoint and update the unit test for the new Fastify route signature.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/shared/src/lib/common/security/permission.ts | Introduces WRITE_ANALYTICS permission constant. |
| packages/server/api/src/app/authentication/authentication.controller.ts | Adds scoped config.security route policies (analytics + sign-up) and updates analytics embed route to include Fastify options/config. |
| packages/server/api/test/unit/authentication/authentication.controller.test.ts | Updates assertion to account for the added route options argument on app.get('/analytics-embed-id', ...). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
bigfluffycookie
approved these changes
Mar 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Fixes OPS-3876.