hide org profile page if needed when directly accessed

This commit is contained in:
Matti Ranta 2018-06-29 17:34:10 -04:00
parent 917cf76d8f
commit 0b0b603a4b
No known key found for this signature in database
GPG Key ID: D9B5613BEB813F99

View File

@ -362,6 +362,13 @@ func showOrgProfile(ctx *context.Context) {
}
org := ctx.Org.Organization
canSeeOrg := models.HasOrgVisible([]*models.User{org}, ctx.User)
if !canSeeOrg {
ctx.NotFound("HasOrgVisible", nil)
return
}
ctx.Data["Title"] = org.DisplayName()
page := ctx.QueryInt("page")