mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-02-17 03:45:13 +00:00
fix: gitlab owner permission
This commit is contained in:
parent
bd616344fd
commit
39ee59a01b
1 changed files with 3 additions and 3 deletions
|
@ -199,12 +199,12 @@ func (g *Gitlab) Perm(u *model.User, owner, name string) (*model.Perm, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
// repo owner are granted full access
|
||||
if u.Login == repo.Owner.Username {
|
||||
// repo owner is granted full access
|
||||
if repo.Owner != nil && repo.Owner.Username == u.Login {
|
||||
return &model.Perm{true, true, true}, nil
|
||||
}
|
||||
|
||||
// check permission for users
|
||||
// check permission for current user
|
||||
m := &model.Perm{}
|
||||
m.Admin = IsAdmin(repo)
|
||||
m.Pull = IsRead(repo)
|
||||
|
|
Loading…
Reference in a new issue