CanEnableEditor returns true if repository is editable and user has proper access level.
()
| 69 | |
| 70 | // CanEnableEditor returns true if repository is editable and user has proper access level. |
| 71 | func (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. |
| 76 | func (r *Repository) Editorconfig() (*editorconfig.Editorconfig, error) { |
no test coverage detected