diff options
-rw-r--r-- | routers/private/serv.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/private/serv.go b/routers/private/serv.go index 8a2e96e15c..b3edd7fc24 100644 --- a/routers/private/serv.go +++ b/routers/private/serv.go @@ -283,7 +283,7 @@ func ServCommand(ctx *context.PrivateContext) { (mode > models.AccessModeRead || repo.IsPrivate || owner.Visibility.IsPrivate() || - user.IsRestricted || + (user != nil && user.IsRestricted) || // user will be nil if the key is a deploykey setting.Service.RequireSignInView) { if key.Type == models.KeyTypeDeploy { if deployKey.Mode < mode { |