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

Admin user has to be explicitly added to private projects #3

Open
plitex opened this issue Aug 9, 2016 · 2 comments
Open

Admin user has to be explicitly added to private projects #3

plitex opened this issue Aug 9, 2016 · 2 comments

Comments

@plitex
Copy link
Contributor

plitex commented Aug 9, 2016

Admin user makes no sense as gitlab private projects are not visible to admin users, so you have to add manually to each private project.
Do you think would be possible to use the API with the current NPM authenticated user?

@plitex plitex changed the title Admin user Admin user has to be explicitly added to private projects Aug 9, 2016
@CrispyConductor
Copy link
Owner

I believe the reason it currently requires the admin user is that, as a normal user, there's no way to determine if the user has master access to the project (required for a sinopia publish). The relevant permissions API calls are (or at least were) admin-only. But I don't remember for sure, and this was originally written for a much older version of the gitlab API - it's possible there's another way of checking permissions now that doesn't require an admin account. Possibly try to perform some action on the project that only a master can perform? I'd rather it not be something that changes state, though.

I don't currently have a gitlab test environment set up to play around with it, but next time I get one set up, I'll take a look to see if there are workarounds.

@plitex
Copy link
Contributor Author

plitex commented Aug 10, 2016

We are running GitLab CE in our company, and I can confirm that the endpoint /projects is not returning all projects in the system logged as an admin user, but if you use /projects/all, which is only for admin users, you get all of them. So I don't really know if this situation is caused by a version change in GitLab, but it must be changed to get it working as you expect (admin never added explicitly to projects).

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants