mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-02-16 18:34:28 +02:00
Merge pull request #899 from andy-g/fix_rebuild_button_display
Displaying rebuild button for users with write access to the repo (not necessarily admins)
This commit is contained in:
commit
b9383265a4
@ -30,7 +30,10 @@ func GetRepo(c web.C, w http.ResponseWriter, r *http.Request) {
|
||||
// if the user is not requesting (or cannot access)
|
||||
// admin data then we just return the repo as-is
|
||||
if role.Admin == false {
|
||||
json.NewEncoder(w).Encode(repo)
|
||||
json.NewEncoder(w).Encode(struct {
|
||||
*model.Repo
|
||||
Perm *model.Perm `json:"role"`
|
||||
}{repo, role})
|
||||
return
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user