From 6362462da8958980385aad7c8df503d90e13380d Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Fri, 19 May 2017 08:59:26 +0800 Subject: fix admin lost permission caused by #947 --- cmd/serv.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd') diff --git a/cmd/serv.go b/cmd/serv.go index 0b1ddc3277..277790d4ca 100644 --- a/cmd/serv.go +++ b/cmd/serv.go @@ -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) -- cgit v1.2.3