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

Method HasAccess

internal/context/repo.go:66–68  ·  view source on GitHub ↗

HasAccess returns true if the current user has at least read access for this repository

()

Source from the content-addressed store, hash-verified

64
65// HasAccess returns true if the current user has at least read access for this repository
66func (r *Repository) HasAccess() bool {
67 return r.AccessMode >= database.AccessModeRead
68}
69
70// CanEnableEditor returns true if repository is editable and user has proper access level.
71func (r *Repository) CanEnableEditor() bool {

Callers 7

runWebFunction · 0.95
RepoAssignmentFunction · 0.45
IssuesFunction · 0.45
parseBaseRepositoryFunction · 0.45
getActionIssueFunction · 0.45
repoAssignmentFunction · 0.45
GetRawFileFunction · 0.45

Implementers 2

Repositoryinternal/database/repo.go
mailerRepointernal/database/issue_mail.go

Calls

no outgoing calls

Tested by

no test coverage detected