diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2020-01-19 14:43:38 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-19 14:43:38 +0800 |
commit | f540d0ac87fe776e71c5caeba20049f46a667efe (patch) | |
tree | 71c115e7b4081ac013c92cfa4e8ad88c43e9dbaa /modules/context | |
parent | 0641965860bc5ebcb1c85067976099986d0136c6 (diff) | |
download | gitea-f540d0ac87fe776e71c5caeba20049f46a667efe.tar.gz gitea-f540d0ac87fe776e71c5caeba20049f46a667efe.zip |
Fix issues/pulls dependencies problems (#9842)
* Fix issues/pulls dependencies problems
* fix swagger and api param name
* fix js
Diffstat (limited to 'modules/context')
-rw-r--r-- | modules/context/repo.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/context/repo.go b/modules/context/repo.go index 66700a6937..3815fc8cea 100644 --- a/modules/context/repo.go +++ b/modules/context/repo.go @@ -138,8 +138,8 @@ func (r *Repository) CanUseTimetracker(issue *models.Issue, user *models.User) b } // CanCreateIssueDependencies returns whether or not a user can create dependencies. -func (r *Repository) CanCreateIssueDependencies(user *models.User) bool { - return r.Permission.CanWrite(models.UnitTypeIssues) && r.Repository.IsDependenciesEnabled() +func (r *Repository) CanCreateIssueDependencies(user *models.User, isPull bool) bool { + return r.Repository.IsDependenciesEnabled() && r.Permission.CanWriteIssuesOrPulls(isPull) } // GetCommitsCount returns cached commit count for current view |