Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Issues
  • #6678

Closed
Open
Created Apr 01, 2014 by Administrator@rootOwner

API - Can't get permission of Group if I only have permission to Project

Created by: blablup

Unable to get the permissions of a group (which users have which access level) [GET /groups/:id/members] if I have only access to a project of that group. If i try to get theese Permissons from the Project I only get directly linked users.

Expected behavior

THat I could see the Group members like I can on the website.

Observed behavior

403 Permission denied.

Example:

(in ruby with gitlab gem) gl_client = Gitlab.client(:endpoint => gitlab_api , :private_token => auth) irb(main):007:0> gl_client.groups => [] irb(main):012:0> gl_client.project(104) => #<Gitlab::ObjectifiedHash:0x0000000152ed50 @data={"id"=>104, "description"=>"Repo of Server lbm000d64.intra.lan (created by chef)", "default_branch"=>nil, "public"=>false, "visibility_level"=>0, "ssh_url_to_repo"=>"[email protected]:server/lbm000d64-intra-lan.git", "http_url_to_repo"=>"https://git.intra.lan/server/lbm000d64-intra-lan.git", "web_url"=>"https://git.intra.lan/server/lbm000d64-intra-lan", "owner"=>#<Gitlab::ObjectifiedHash:0x0000000152eb70 @data={"id"=>18, "name"=>"server", "created_at"=>"2013-10-21T07:50:54.000Z"}>, "name"=>"lbm000d64.intra.lan", "name_with_namespace"=>"server / lbm000d64.intra.lan", "path"=>"lbm000d64-intra-lan", "path_with_namespace"=>"server/lbm000d64-intra-lan", "issues_enabled"=>true, "merge_requests_enabled"=>true, "wall_enabled"=>true, "wiki_enabled"=>true, "snippets_enabled"=>false, "created_at"=>"2014-02-05T13:48:10.000Z", "last_activity_at"=>"2014-04-01T09:35:11.000Z", "namespace"=>#<Gitlab::ObjectifiedHash:0x0000000152e8a0 @data={"id"=>18, "name"=>"server", "path"=>"server", "owner_id"=>2, "created_at"=>"2013-10-21T07:50:54.000Z", "updated_at"=>"2013-10-21T07:50:54.000Z", "description"=>""}>}> irb(main):028:0> gl_client.team_members(104) => [#<Gitlab::ObjectifiedHash:0x0000000221cad0 @data={"id"=>1, "username"=>"root", "email"=>"[email protected]", "name"=>"Administrator", "state"=>"active", "created_at"=>"2013-07-05T23:07:42.000Z", "access_level"=>40}>, #<Gitlab::ObjectifiedHash:0x0000000221c648 @data={"id"=>25, "username"=>"lbm000d64.intra.lan", "email"=>"[email protected]", "name"=>"[email protected]", "state"=>"active", "created_at"=>"2014-02-03T13:31:29.000Z", "access_level"=>40}>] irb(main):029:0> gl_client.project(104).namespace.id => 18

irb(main):029:0> gl_client.group_members(18) Gitlab::Error::Forbidden: Server responded with code 403, message: 403 Forbidden - lbm000d64.intra.lan lacks sufficient access to server. Request URI: https://git.intra.lan/api/v3/groups/18/members

Relevant logs and/or screenshots bildschirmfoto von 2014-04-01 16 44 26 bildschirmfoto von 2014-04-01 16 43 44 bildschirmfoto von 2014-04-01 16 43 29

Assignee
Assign to
Time tracking