fix admin lost permission caused by #947
This commit is contained in:
parent
25d6e2a660
commit
6362462da8
4 changed files with 14 additions and 9 deletions
|
@ -250,7 +250,7 @@ func runServ(c *cli.Context) error {
|
|||
user.Name, requestedMode, repoPath)
|
||||
}
|
||||
|
||||
if !repo.CheckUnitUser(user.ID, unitType) {
|
||||
if !repo.CheckUnitUser(user.ID, user.IsAdmin, unitType) {
|
||||
fail("You do not have allowed for this action",
|
||||
"User %s does not have allowed access to repository %s 's code",
|
||||
user.Name, repoPath)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue