Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

something wrong with gitlab ProjectAccess #42

Open
fangweisi opened this issue Jun 1, 2018 · 1 comment
Open

something wrong with gitlab ProjectAccess #42

fangweisi opened this issue Jun 1, 2018 · 1 comment

Comments

@fangweisi
Copy link

fangweisi commented Jun 1, 2018

I found that pipeline use "Permissions.ProjectAccess.AccessLevel" to deside if I can pull the code.
So I must add the right to project not to the group.
I used to make my account as the owner of the group, but it's not work in rancher, it show "no permission".
After I make the account as the master of the project, it works.

@gitlawr
Copy link
Contributor

gitlawr commented Sep 5, 2018

Actually, it detects admin permission for hooks using both ProjectAccess and GroupAccess.
Per Gitlab's repo API, a user can still have permissions even though these two fields are null.
The issue probably happens when a user's project is shared with a group. The shared_with_groups field does not tell the real permission of the current user unless user-group relations are inspected.

//info from repo api
"shared_with_groups": [
            {
                "group_id": 2, 
                "group_name": "mygroup", 
                "group_access_level": 40
            }
        ], 
"permissions": {
            "project_access": null, 
            "group_access": null
        }

As workarounds, add the user to be a member or transfer the project to the group should help.

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

No branches or pull requests

2 participants