hide org profile page if needed when directly accessed
This commit is contained in:
parent
917cf76d8f
commit
0b0b603a4b
|
@ -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")
|
||||
|
|
Loading…
Reference in New Issue
Block a user