9a5720e8ad
Universal: PR Check / Branch Policy (pull_request) Successful in 1s
Branch Policy Check / Verify merge target (pull_request) Successful in 1s
PR RC Release / Build RC Release (pull_request) Successful in 3s
Universal: PR Check / Validate PR (pull_request) Failing after 6s
Branch Cleanup / Delete merged branch (pull_request) Successful in 1s
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Full namespace migration: update the Go module path and all import statements from git.mokoconsulting.tech to code.mokoconsulting.tech. Also updates all URL references in templates, workflows, configs, tests, and documentation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
40 lines
1.4 KiB
Go
40 lines
1.4 KiB
Go
// Copyright 2014 The Gogs Authors. All rights reserved.
|
|
// Copyright 2020 The Gitea Authors.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package admin
|
|
|
|
import (
|
|
"code.mokoconsulting.tech/MokoConsulting/MokoGitea/models/db"
|
|
user_model "code.mokoconsulting.tech/MokoConsulting/MokoGitea/models/user"
|
|
"code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/setting"
|
|
"code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs"
|
|
"code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/templates"
|
|
"code.mokoconsulting.tech/MokoConsulting/MokoGitea/routers/web/explore"
|
|
"code.mokoconsulting.tech/MokoConsulting/MokoGitea/services/context"
|
|
)
|
|
|
|
const (
|
|
tplOrgs templates.TplName = "admin/org/list"
|
|
)
|
|
|
|
// Organizations show all the organizations
|
|
func Organizations(ctx *context.Context) {
|
|
ctx.Data["Title"] = ctx.Tr("admin.organizations")
|
|
ctx.Data["PageIsAdminOrganizations"] = true
|
|
|
|
if ctx.FormString("sort") == "" {
|
|
ctx.SetFormString("sort", UserSearchDefaultAdminSort)
|
|
}
|
|
|
|
explore.RenderUserSearch(ctx, user_model.SearchUserOptions{
|
|
Actor: ctx.Doer,
|
|
Types: []user_model.UserType{user_model.UserTypeOrganization},
|
|
IncludeReserved: true, // administrator needs to list all accounts include reserved
|
|
ListOptions: db.ListOptions{
|
|
PageSize: setting.UI.Admin.OrgPagingNum,
|
|
},
|
|
Visible: []structs.VisibleType{structs.VisibleTypePublic, structs.VisibleTypeLimited, structs.VisibleTypePrivate},
|
|
}, tplOrgs)
|
|
}
|