-
-
Notifications
You must be signed in to change notification settings - Fork 94
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(api): Added Project Level Access #221
feat(api): Added Project Level Access #221
Conversation
… type fixes for CreateProject dto
PR Description updated to latest commit (eb0d7ff) |
PR Review 🔍(Review updated until commit 1488ff1)
Code feedback:
|
PR Code Suggestions ✨
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okei I've added quite a few reviews. Do go through them. And, when you make the changes and push it, do resolve the threads one by one.
…idPrime/keyshade into 154-project-level-access
Quality Gate passedIssues Measures |
/review |
Persistent review updated to latest commit 1488ff1 |
## [1.4.0](v1.3.0...v1.4.0) (2024-05-24) ### 🚀 Features * add example for health and email auth ([b834d25](b834d25)) * **api:** Add `minio-client` provider ([#237](#237)) ([cd71c5a](cd71c5a)) * **api:** Add feature to fork projects ([#239](#239)) ([3bab653](3bab653)) * **api:** Added feedback form module ([#210](#210)) ([ae1efd8](ae1efd8)) * **api:** Added Project Level Access ([#221](#221)) ([564f5ed](564f5ed)) * **api:** Added support for changing email of users ([#233](#233)) ([5ea9a10](5ea9a10)) * implemented auth, ui for most, and fixed cors ([#217](#217)) ([feace86](feace86)) * **platfrom:** add delete method in api client ([#225](#225)) ([55cf09f](55cf09f)) * **postman:** add example for get_self and update_self ([e015acf](e015acf)) * **web:** Add and link privacy and tnc page ([#226](#226)) ([ec81eb9](ec81eb9)) ### 🐛 Bug Fixes * **web:** docker next config not found ([#228](#228)) ([afe3160](afe3160)) ### 📚 Documentation * Added docs regarding postman, and refactored architecture diagrams ([f1c9777](f1c9777)) * Fix typo in organization-of-code.md ([#234](#234)) ([11244a2](11244a2)) ### 🔧 Miscellaneous Chores * **api:** Get feedback forward email from process.env ([#236](#236)) ([204c9d1](204c9d1)) * **postman:** Initialized postman ([bb76384](bb76384)) * **release:** Update changelog config ([af91283](af91283)) * Remove swagger docs ([#220](#220)) ([7640299](7640299)) ### 🔨 Code Refactoring * **api:** Replaced OTP code from alphanumeric to numeric ([#230](#230)) ([f16162a](f16162a))
🎉 This PR is included in version 1.4.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
User description
Description
GLOBAL
,INTERNAL
,PRIVATE
access level typescheckAuthorityOverProject
method allow access to projects based on differed access levelscheck-user-role-associations.ts
in thesrc/common
folder for checking the set of roles associatedwith the workspace member for project access authorization
Fixes #154
Dependencies
None
Future Improvements
Mentions
Screenshots of relevant screens
Developer's checklist
If changes are made in the code:
Documentation Update
PR Type
enhancement, bug_fix
Description
isPublic
.accessLevel
field.authority-checker.service.ts
.checkUserRoleAssociations
to validate user roles for project access.Changes walkthrough 📝
9 files
project.e2e.spec.ts
Enhance Project Controller Tests with Access Level Checks
apps/api/src/project/project.e2e.spec.ts
INTERNAL, PRIVATE.
accessLevel
instead ofisPublic
.globalProject
,internalProject
, andprivateProject
for testing.authority-checker.service.ts
Refactor Authority Checker to Support New Access Levels
apps/api/src/common/authority-checker.service.ts
levels.
checkUserRoleAssociations
function to validate user rolesfor PRIVATE projects.
check-user-role-associations.ts
Implement User Role Association Check for Project Access
apps/api/src/common/check-user-role-associations.ts
the workspace.
project.service.ts
Update Project Service to Handle Access Levels
apps/api/src/project/service/project.service.ts
accessLevel
instead ofisPublic
in projectcreation and update.
create.project.ts
Refactor CreateProject DTO to Use Access Level Enum
apps/api/src/project/dto/create.project/create.project.ts
isPublic
boolean withaccessLevel
enum in project DTO.approval.types.ts
Update Approval Types to Reflect Access Level Changes
apps/api/src/approval/approval.types.ts
UpdateProjectMetadata
to useaccessLevel
instead ofisPublic
.workspace.service.ts
Update Workspace Service to Support Access Level Queries
apps/api/src/workspace/service/workspace.service.ts
accessLevel
property in projectqueries.
schema.prisma
Introduce Project Access Level Enum in Prisma Schema
apps/api/src/prisma/schema.prisma
ProjectAccessLevel
enum with values 'GLOBAL', 'INTERNAL','PRIVATE'.
isPublic
withaccessLevel
in theProject
model.migration.sql
SQL Migration for Project Access Level Changes
apps/api/src/prisma/migrations/20240513155428_add_project_level_access/migration.sql
isPublic
column withaccessLevel
in theProject
table.ProjectAccessLevel
enum type in the database.4 files
secret.e2e.spec.ts
Update Secret Controller Tests to Use Access Level
apps/api/src/secret/secret.e2e.spec.ts
accessLevel
instead ofisPublic
.variable.e2e.spec.ts
Update Variable Controller Tests to Use Access Level
apps/api/src/variable/variable.e2e.spec.ts
accessLevel
instead ofisPublic
.event.e2e.spec.ts
Update Event Controller Tests for Global Access Level
apps/api/src/event/event.e2e.spec.ts
accessLevel
'GLOBAL' for a project.environment.e2e.spec.ts
Update Environment Controller Tests for Private Access Level
apps/api/src/environment/environment.e2e.spec.ts
accessLevel
'PRIVATE' for a project.