MCPcopy Create free account
hub / github.com/gogs/gogs / IsPublicMember

Method IsPublicMember

internal/database/users.go:1433–1435  ·  view source on GitHub ↗

IsPublicMember returns true if the user has public membership of the given organization. TODO(unknwon): This is also used in templates, which should be fixed by having a dedicated type `template.User`.

(orgID int64)

Source from the content-addressed store, hash-verified

1431// TODO(unknwon): This is also used in templates, which should be fixed by
1432// having a dedicated type `template.User`.
1433func (u *User) IsPublicMember(orgID int64) bool {
1434 return IsPublicMembership(orgID, u.ID)
1435}
1436
1437// GetOrganizationCount returns the count of organization membership that the
1438// user has.

Callers

nothing calls this directly

Implementers 1

mailerUserinternal/database/issue_mail.go

Calls 1

IsPublicMembershipFunction · 0.85

Tested by

no test coverage detected