We are using rest apis for creating repositories, inviting team members, creating branches, restricting its permissions etc. but we want that token with limited permissions, current token seems admin and has repository deletion permissions as well, and we dont want that, any idea howe we can make it limited access?
Hello @PravinU and welcome to the Community!
Currently, the OAuth scope repository:admin is required to execute most of the actions that you listed. Unfortunately, there's not a particular scope that includes all the actions you listed, except repo deletion. The admin scope also comes with the ability to delete the repository.
You can have a full description of what is included in each scope in the following documentation :
Based on that list, you may adjust your scopes accordingly to the action being performed, and restrict the admin scope to only the API calls where it is strictly necessary.
Thank you, @PravinU !
Patrik S
Ohh, thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @PravinU ,
If your workspace is under the premium plan, you can restrict access to the workspace to particular IPs by leveraging the IP allowlisting feature. However, this will restrict any access to the workspace originating from IPs that are not on the list. This includes both the API and UI access. It's not possible to limit only the admins APIs.
As for the repository deletion, support can help to recover if the repository was deleted within the last 7 days. You can open a support request on the following portal:
Also, given that git is a distributed version control system, any previous clone that you or any member of your team have can also be considered a backup of the repo, as it contains the history of the repository. If that is the case, you can create a new repository and push the local backup repo to the new repo.
Thank you, @PravinU !
Patrik S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.