user

package
v1.25.0-dev Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2025 License: MIT Imports: 24 Imported by: 2

Documentation

Index

Constants

View Source
const (
	RepoNameProfilePrivate = ".profile-private"
	RepoNameProfile        = ".profile"
)

Variables

This section is empty.

Functions

func BlockedUsers added in v1.22.0

func BlockedUsers(ctx *context.Context, blocker *user_model.User)

func BlockedUsersPost added in v1.22.0

func BlockedUsersPost(ctx *context.Context, blocker *user_model.User)

func FindOwnerProfileReadme

func FindOwnerProfileReadme(ctx *context.Context, doer *user_model.User, optProfileRepoName ...string) (profileDbRepo *repo_model.Repository, profileReadmeBlob *git.Blob)

func GetFilterUserIDByName added in v1.23.0

func GetFilterUserIDByName(ctx context.Context, name string) string

GetFilterUserIDByName tries to get the user ID from the given username. Before, the "issue filter" passes user ID to query the list, but in many cases, it's impossible to pre-fetch the full user list. So it's better to make it work like GitHub: users could input username directly. Since it only converts the username to ID directly and is only used internally (to search issues), so no permission check is needed. Return values: * "": no filter * "{the-id}": match the id * "(none)": match no issue (due to the user doesn't exist)

func MakeSelfOnTop added in v1.23.0

func MakeSelfOnTop(doer *user.User, users []*user.User) []*user.User

Types

type PrepareOwnerHeaderResult

type PrepareOwnerHeaderResult struct {
	ProfilePublicRepo        *repo_model.Repository
	ProfilePublicReadmeBlob  *git.Blob
	ProfilePrivateRepo       *repo_model.Repository
	ProfilePrivateReadmeBlob *git.Blob
	HasOrgProfileReadme      bool
}

func RenderUserOrgHeader

func RenderUserOrgHeader(ctx *context.Context) (result *PrepareOwnerHeaderResult, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳