Projects in personal namespace don't properly show "Owner" in members list
Summary
The project members page is supposed to show each users effective permissions. Users with projects in their personal namespace are only shown as "Maintainer" on that project rather than "Owner".
Additionally project members API does not properly return owners ("access_level": 50
) of personal namespace projects.
Also this bug has to be making some logic overly complex as well since for personal namespaces it cannot use access_level
from project_authorizations
table because currently projects in personal namespace will never have entries with access_level=50
in that table.
Steps to reproduce
- Create project in personal namespace
- See
/-/project_members
page GET /projects/:id/members/all
- See no members with
"access_level": 50
Example Project
https://gitlab.com/bbodenmiller/windows-testing/-/project_members
What is the current bug behavior?
Showing as "Maintainer" rather than "Owner"
[
{
"id":5332,
"name":"Ben Bodenmiller",
"username":"bbodenmiller",
"state":"active",
"avatar_url":"https://assets.gitlab-static.net/uploads/-/system/user/avatar/5332/avatar.png",
"web_url":"https://gitlab.com/bbodenmiller",
"access_level":40,
"expires_at":null
},
{
"id":1361348,
"name":"Ray Paik",
"username":"rpaik",
"state":"active",
"avatar_url":"https://secure.gravatar.com/avatar/394c99b6425c5df21da8f51907580a8e?s=80\u0026d=identicon",
"web_url":"https://gitlab.com/rpaik",
"access_level":20,
"expires_at":null
}
]
What is the expected correct behavior?
Should show as "Owner" as one does on projects in group namespace
[
{
"id":5332,
"name":"Ben Bodenmiller",
"username":"bbodenmiller",
"state":"active",
"avatar_url":"https://assets.gitlab-static.net/uploads/-/system/user/avatar/5332/avatar.png",
"web_url":"https://gitlab.com/bbodenmiller",
"access_level":50,
"expires_at":null
},{
"id":1361348,
"name":"Ray Paik",
"username":"rpaik",
"state":"active",
"avatar_url":"https://secure.gravatar.com/avatar/394c99b6425c5df21da8f51907580a8e?s=80\u0026d=identicon",
"web_url":"https://gitlab.com/rpaik",
"access_level":30,
"expires_at":null
}
]
Relevant logs and/or screenshots
Above
Output of checks
This bug happens on GitLab.com
Possible fixes
Set access_level
to 50
rather than 40
for personal namespace project owners in project_authorizations
table.
When fixed update https://docs.gitlab.com/ee/api/members.html and other help pages with similar caution.