[go: up one dir, main page]

Skip to content

Feature Proposal: Snippets restricted-public link-only access level

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Proposal

Currently, Snippets can only be Private, Internal, or Public. With this Feature Request, I'd like to request the addition of a 4th option, available without login, but also not public, only accessible by a direct link. Internally this could work by appending an access token to the snippet URL.

Currently, snippets are accessible by https://<gitlab instance>/-/snippets/<id>. And with the new link-only a share URL would look like this: https://<gitlab instance>/-/snippets/<id>?auth=<token>.

For this proposal, I'd also like to open up a discussion about how this token part exactly should work.

  1. Only one token per Snippet can be regenerated but at most one token per snippet, so basically all shared links use the same token. Easier to implement, but changing the token means that the new token/link needs to be distributed everywhere. So it'd be hard to change in some cases but should be fine for the average case of wanting to share text with a limited group of people that do not have users in the GitLab instance.

  2. Allowing multiple tokens to be assigned to a single Snippet including a comment. But this is probably harder to implement but would allow for a simpler rotation as well as granting multiple distinct entities access and granularly revoking it without them having to have accounts in the GitLab instance.

Edited by 🤖 GitLab Bot 🤖