diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/context/package.go | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/modules/context/package.go b/modules/context/package.go index d12bdc4913..ce0f9a511b 100644 --- a/modules/context/package.go +++ b/modules/context/package.go @@ -85,12 +85,15 @@ func packageAssignment(ctx *Context, errCb func(int, string, interface{})) { } func determineAccessMode(ctx *Context) (perm.AccessMode, error) { - accessMode := perm.AccessModeNone - if setting.Service.RequireSignInView && ctx.Doer == nil { - return accessMode, nil + return perm.AccessModeNone, nil } + if ctx.Doer != nil && !ctx.Doer.IsGhost() && (!ctx.Doer.IsActive || ctx.Doer.ProhibitLogin) { + return perm.AccessModeNone, nil + } + + accessMode := perm.AccessModeNone if ctx.Package.Owner.IsOrganization() { org := organization.OrgFromUser(ctx.Package.Owner) |