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

Method IsWriter

internal/context/repo.go:61–63  ·  view source on GitHub ↗

IsWriter returns true if current user has write or higher access of repository.

()

Source from the content-addressed store, hash-verified

59
60// IsWriter returns true if current user has write or higher access of repository.
61func (r *Repository) IsWriter() bool {
62 return r.AccessMode >= database.AccessModeWrite
63}
64
65// HasAccess returns true if the current user has at least read access for this repository
66func (r *Repository) HasAccess() bool {

Callers 15

CanEnableEditorMethod · 0.95
RepoAssignmentFunction · 0.80
RepoRefFunction · 0.80
RequireRepoWriterFunction · 0.80
renderFileFunction · 0.80
RetrieveRepoMetasFunction · 0.80
ValidateRepoMetasFunction · 0.80
viewIssueFunction · 0.80
UpdateIssueTitleFunction · 0.80
UpdateIssueContentFunction · 0.80
NewCommentFunction · 0.80
reqRepoWriterFunction · 0.80

Implementers 2

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

Calls

no outgoing calls

Tested by

no test coverage detected