Forking allows users to create a local copy of any public project into their own account. The flow that we are expecting is, if a project has accessLevel set to GLOBAL, we would allow anyone to fork the project. But currently, we are checking access to the project based upon the membership of the user in the workspace.
We don't want to do this anymore. We would simply like to check if the project has the accessLevel set to GLOBAL or not. If yes, we allow the fork. If no, we don't.
Description
Forking allows users to create a local copy of any public project into their own account. The flow that we are expecting is, if a project has
accessLevel
set toGLOBAL
, we would allow anyone to fork the project. But currently, we are checking access to the project based upon the membership of the user in the workspace.We don't want to do this anymore. We would simply like to check if the project has the
accessLevel
set toGLOBAL
or not. If yes, we allow the fork. If no, we don't.Solution
The changes would be scoped in this place: https://github.com/keyshade-xyz/keyshade/blob/581629dfc8917f86d008044e22e806af4abd20db/apps/api/src/project/service/project.service.ts#L333-L344
accessLevel
isGLOBAL
or not, and do the operations.project.e2e.spec.ts
accordingly.