···386386 return a.createAuthSource(ctx, authSource)
387387}
388388389389-// updateLdapBindDn updates a new LDAP (simple auth) authentication source.
389389+// updateLdapSimpleAuth updates a new LDAP (simple auth) authentication source.
390390func (a *authService) updateLdapSimpleAuth(c *cli.Context) error {
391391 ctx, cancel := installSignals()
392392 defer cancel()
+18
custom/conf/app.example.ini
···925925;; Valid site url schemes for user profiles
926926;VALID_SITE_URL_SCHEMES=http,https
927927928928+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
929929+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
930930+;[service.explore]
931931+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
932932+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
933933+;;
934934+;; Only allow signed in users to view the explore pages.
935935+;REQUIRE_SIGNIN_VIEW = false
936936+;;
937937+;; Disable the users explore page.
938938+;DISABLE_USERS_PAGE = false
939939+;;
940940+;; Disable the organizations explore page.
941941+;DISABLE_ORGANIZATIONS_PAGE = false
942942+;;
943943+;; Disable the code explore page.
944944+;DISABLE_CODE_PAGE = false
945945+;;
928946929947;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
930948;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+1-1
models/issues/issue.go
···875875 return issues, nil
876876}
877877878878-// IsNewPinnedAllowed returns if a new Issue or Pull request can be pinned
878878+// IsNewPinAllowed returns if a new Issue or Pull request can be pinned
879879func IsNewPinAllowed(ctx context.Context, repoID int64, isPull bool) (bool, error) {
880880 var maxPin int
881881 _, err := db.GetEngine(ctx).SQL("SELECT COUNT(pin_order) FROM issue WHERE repo_id = ? AND is_pull = ? AND pin_order > 0", repoID, isPull).Get(&maxPin)
+1-1
models/issues/pull.go
···689689 return pr, pr.LoadAttributes(ctx)
690690}
691691692692-// GetPullRequestsByBaseHeadInfo returns the pull request by given base and head
692692+// GetPullRequestByBaseHeadInfo returns the pull request by given base and head
693693func GetPullRequestByBaseHeadInfo(ctx context.Context, baseID, headID int64, base, head string) (*PullRequest, error) {
694694 pr := &PullRequest{}
695695 sess := db.GetEngine(ctx).
···11+fix: [commit](https://codeberg.org/forgejo/forgejo/commit/d13a4ab5632d6a9697bd0907f9c69ed57d949340) Fixed a bug related to disabling two-factor authentication
22+chore: [commit](https://codeberg.org/forgejo/forgejo/commit/ab26d880932dbc116c43ea277029984c7a6d4e94) Emit a log message when failing to delete an inactive user
33+feat: [commit](https://codeberg.org/forgejo/forgejo/commit/ab660c5944d59cdb4ecc071401445ac9f53cee45) Add `DISABLE_ORGANIZATIONS_PAGE` and `DISABLE_CODE_PAGE` settings for explore pages
+10-2
routers/api/v1/api.go
···395395396396func reqExploreSignIn() func(ctx *context.APIContext) {
397397 return func(ctx *context.APIContext) {
398398- if setting.Service.Explore.RequireSigninView && !ctx.IsSigned {
398398+ if (setting.Service.RequireSignInView || setting.Service.Explore.RequireSigninView) && !ctx.IsSigned {
399399 ctx.Error(http.StatusUnauthorized, "reqExploreSignIn", "you must be signed in to search for users")
400400+ }
401401+ }
402402+}
403403+404404+func reqUsersExploreEnabled() func(ctx *context.APIContext) {
405405+ return func(ctx *context.APIContext) {
406406+ if setting.Service.Explore.DisableUsersPage {
407407+ ctx.NotFound()
400408 }
401409 }
402410}
···887895888896 // Users (requires user scope)
889897 m.Group("/users", func() {
890890- m.Get("/search", reqExploreSignIn(), user.Search)
898898+ m.Get("/search", reqExploreSignIn(), reqUsersExploreEnabled(), user.Search)
891899892900 m.Group("/{username}", func() {
893901 m.Get("", reqExploreSignIn(), user.GetInfo)