mirror of
				https://github.com/go-gitea/gitea
				synced 2025-10-31 03:18:24 +00:00 
			
		
		
		
	Add DISABLE_ORGANIZATIONS_PAGE and DISABLE_CODE_PAGE settings for explore pages and fix an issue related to user search (#32288)
				
					
				
			These settings can allow users to only display the repositories explore page. Thanks to yp05327 and wxiaoguang ! --------- Co-authored-by: Giteabot <teabot@gitea.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
		| @@ -165,7 +165,9 @@ func RenderRepoSearch(ctx *context.Context, opts *RepoSearchOptions) { | ||||
|  | ||||
| // Repos render explore repositories page | ||||
| func Repos(ctx *context.Context) { | ||||
| 	ctx.Data["UsersIsDisabled"] = setting.Service.Explore.DisableUsersPage | ||||
| 	ctx.Data["UsersPageIsDisabled"] = setting.Service.Explore.DisableUsersPage | ||||
| 	ctx.Data["OrganizationsPageIsDisabled"] = setting.Service.Explore.DisableOrganizationsPage | ||||
| 	ctx.Data["CodePageIsDisabled"] = setting.Service.Explore.DisableCodePage | ||||
| 	ctx.Data["Title"] = ctx.Tr("explore") | ||||
| 	ctx.Data["PageIsExplore"] = true | ||||
| 	ctx.Data["PageIsExploreRepositories"] = true | ||||
|   | ||||
		Reference in New Issue
	
	Block a user