keyshade-xyz / keyshade

Realtime secret and configuration management tool, with the best in class security and seamless integration support
https://keyshade.xyz
Mozilla Public License 2.0
208 stars 105 forks source link

API: Update logic for forking projects #364

Closed rajdip-b closed 3 months ago

rajdip-b commented 4 months ago

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 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.

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

Dark-Kernel commented 3 months ago

/attempt

github-actions[bot] commented 3 months ago

Assigned the issue to @Dark-Kernel!