Skip to content
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

GitLab users get read-only access if they are on maintainer on repo, but guest on subgroup #1644

Closed
RYamashita3 opened this issue Feb 24, 2023 · 11 comments · Fixed by #1704 or #1745
Closed
Assignees
Labels
bug Something isn't working

Comments

@RYamashita3
Copy link

RYamashita3 commented Feb 24, 2023

There seems to be an issue with GitLab where when a user has maintainer access on a repository, but only guest on a the group the repository is part of, we give the user only read-only access.

To reproduce:

  • Create a repository in a subgroup
  • Give the user guest access in the subgroup
  • Give the user maintainer access in the repo

Expected: User has write access to the repo
Actual outcome: User has read-only access to the repo

Original issue description

Describe the bug
I've set up a sync connection to Gitlab using an api scope personal access token on a maintainer-level account, and am able to add branches and files to the Gitlab repo from the plugin. However, all buttons in the plugin for adding tokens or sets, editing or duplicating existing tokens, or pushing to Gitlab are greyed out. The JSON isn't directly editable either. I have a Pro level Tokens Studio account. Also, when Gitlab is selected as the source, the token set names in the left-hand pane are misaligned from where they usually are.

To Reproduce
Steps to reproduce the behavior:
None

Expected behavior
I should be able to edit, add, and remove tokens stored in a Gitlab repo

Screenshots or Screencasts
Local source:
local

Gitlab source:
gitlab

Figma file (optional)
None

JSON (optional)
None

@six7
Copy link
Collaborator

six7 commented Feb 27, 2023

As long as you are not on Pro you need your filePath to end in .json (to sync to one json file). If your filePath doesn't end with a .json it will sync to multiple files, which is a Pro feature. From your screenshots I'm unable to tell, so ideally share the sync setup form

@RYamashita3
Copy link
Author

@six7 : I have a Pro account and have tried both tokens and tokens.json for the file path. I've also tried subfolders (e.g. tokens/newtokens) and other configurations (e.g. with a leading slash, like /tokens/newtokens/tokens.json), without any luck.

The Tokens Studio plugin was able to create new folders and files in Gitlab during initial sync, but there's no editing or push options available in the plugin. I'm also able to create new branches from inside the plugin without issue.

One other note is that we do have token transformer and style dictionary already installed in the repo.

Sync setup attached. I have to redact the repo path details, but there's no leading or trailing slash on the path.

sync setup

@six7
Copy link
Collaborator

six7 commented Feb 27, 2023

Did you set your access token to write on repo?

CC'ing @rbosker who might know more about that one

@RYamashita3
Copy link
Author

Yes, the current access token is set to "api". I've also tried with all options checked: "api, read_api, read_user, read_repository, write_repository, read_registry, write_registry".

@RYamashita3
Copy link
Author

@six7 , @rbosker : I've triple checked personal token settings; I'm at Pro level of Tokens Studio; I have Maintainer level permissions on Gitlab; I've relaunched Figma, the plugin, and my machine; and the plugin functions without issues on Github and local sync but not Gitlab. We have to work in Gitlab, but I'm out of ideas on our end for connecting properly and using the full functionality of the Pro plugin.

@RYamashita3
Copy link
Author

@six7, @rbosker : Any update on this issue? It's preventing us from moving forward with our tokens setup, and it's been 2 weeks

@six7 six7 moved this from 📥 Triage to 🔜 Next up in Tokens Studio for Figma Roadmap Mar 17, 2023
@six7 six7 added the bug Something isn't working label Mar 17, 2023
@six7
Copy link
Collaborator

six7 commented Mar 19, 2023

I updated the issue description - we'll work on it this week during bug bash

@six7 six7 changed the title Gitlab connection is set up, but tokens are uneditable GitLab users get read-only access if they are on maintainer on repo, but guest on subgroup Mar 19, 2023
@swordEdge swordEdge moved this from 🔜 Next up to 🕜 In Progress in Tokens Studio for Figma Roadmap Mar 19, 2023
@swordEdge swordEdge linked a pull request Mar 20, 2023 that will close this issue
@swordEdge swordEdge moved this from 🕜 In Progress to 👀 Needs review in Tokens Studio for Figma Roadmap Mar 20, 2023
@swordEdge swordEdge self-assigned this Mar 20, 2023
@six7 six7 moved this from 👀 Needs review to 🤞 To be released in Tokens Studio for Figma Roadmap Mar 20, 2023
@six7 six7 mentioned this issue Mar 24, 2023
@github-project-automation github-project-automation bot moved this from 🤞 To be released to ✅ Done in Tokens Studio for Figma Roadmap Mar 27, 2023
@RYamashita3
Copy link
Author

@six7 : The fix in the new release appears to have resolved the issue on our end. Thank you!!

@RYamashita3
Copy link
Author

@six7 : Perhaps I spoke too soon. Most of it is working, however now I'm unable to create a new branch. Before this fix, I was able to create new branches but not do anything else. Now I can do everything else but not create a new branch.

The error states "There was an error connecting. Check your credentials." Console says error code 400. I've tried new personal access tokens, but still doesn't work.

@six7
Copy link
Collaborator

six7 commented Mar 27, 2023

@RYamashita3 just tried to reproduce with the same setup you have, was able to do so. Can you create a new issue with a description of the issue and what settings you have? Also the scopes your api token has.

@RYamashita3
Copy link
Author

@six7 : done. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: ✅ Done
3 participants