diff options
Diffstat (limited to 'modules/context/repo.go')
-rw-r--r-- | modules/context/repo.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/context/repo.go b/modules/context/repo.go index 1fe5482ce1..7239b353ff 100644 --- a/modules/context/repo.go +++ b/modules/context/repo.go @@ -104,6 +104,11 @@ func (r *Repository) CanUseTimetracker(issue *models.Issue, user *models.User) b r.IsWriter() || issue.IsPoster(user.ID) || isAssigned) } +// CanCreateIssueDependencies returns whether or not a user can create dependencies. +func (r *Repository) CanCreateIssueDependencies(user *models.User) bool { + return r.Repository.IsDependenciesEnabled() && r.IsWriter() +} + // GetCommitsCount returns cached commit count for current view func (r *Repository) GetCommitsCount() (int64, error) { var contextName string |