Documentation
¶
Index ¶
- Constants
- func BlockedUsers(ctx *context.Context, blocker *user_model.User)
- func BlockedUsersPost(ctx *context.Context, blocker *user_model.User)
- func FindOwnerProfileReadme(ctx *context.Context, doer *user_model.User, optProfileRepoName ...string) (profileDbRepo *repo_model.Repository, profileReadmeBlob *git.Blob)
- func GetFilterUserIDByName(ctx context.Context, name string) string
- func MakeSelfOnTop(doer *user.User, users []*user.User) []*user.User
- type PrepareOwnerHeaderResult
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
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)
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)
Click to show internal directories.
Click to hide internal directories.