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

Method CanEnableEditor

internal/context/repo.go:71–73  ·  view source on GitHub ↗

CanEnableEditor returns true if repository is editable and user has proper access level.

()

Source from the content-addressed store, hash-verified

69
70// CanEnableEditor returns true if repository is editable and user has proper access level.
71func (r *Repository) CanEnableEditor() bool {
72 return r.Repository.CanEnableEditor() && r.IsViewBranch && r.IsWriter() && !r.Repository.IsBranchRequirePullRequest(r.BranchName)
73}
74
75// Editorconfig returns the ".editorconfig" definition if found in the HEAD of the default branch.
76func (r *Repository) Editorconfig() (*editorconfig.Editorconfig, error) {

Callers 3

runWebFunction · 0.45
renderDirectoryFunction · 0.45
renderFileFunction · 0.45

Implementers 2

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

Calls 2

IsWriterMethod · 0.95

Tested by

no test coverage detected