integrations: fixed missing template variable for fork reference checks.
This commit is contained in:
parent
ab516a3197
commit
8bfe7506a0
2 changed files with 5 additions and 7 deletions
|
|
@ -67,12 +67,6 @@ class RepoSettingsView(RepoAppView):
|
|||
.filter(UserFollowing.user_id == c.default_user_id) \
|
||||
.filter(UserFollowing.follows_repository == self.db_repo).scalar()
|
||||
|
||||
c.has_origin_repo_read_perm = False
|
||||
if self.db_repo.fork:
|
||||
c.has_origin_repo_read_perm = h.HasRepoPermissionAny(
|
||||
'repository.write', 'repository.read', 'repository.admin')(
|
||||
self.db_repo.fork.repo_name, 'repo set as fork page')
|
||||
|
||||
c.ver_info_dict = self.rhodecode_vcs_repo.get_hooks_info()
|
||||
|
||||
return self._get_template_context(c)
|
||||
|
|
|
|||
|
|
@ -114,7 +114,6 @@ class IntegrationSettingsViewBase(BaseAppView):
|
|||
_ = self.request.translate
|
||||
c = super(IntegrationSettingsViewBase, self)._get_local_tmpl_context(
|
||||
include_app_defaults=include_app_defaults)
|
||||
|
||||
c.active = 'integrations'
|
||||
|
||||
return c
|
||||
|
|
@ -404,6 +403,11 @@ class RepoIntegrationsView(IntegrationSettingsViewBase):
|
|||
c.repo_name = self.db_repo.repo_name
|
||||
c.repository_pull_requests = ScmModel().get_pull_requests(self.repo)
|
||||
|
||||
c.has_origin_repo_read_perm = False
|
||||
if self.db_repo.fork:
|
||||
c.has_origin_repo_read_perm = h.HasRepoPermissionAny(
|
||||
'repository.write', 'repository.read', 'repository.admin')(
|
||||
self.db_repo.fork.repo_name, 'summary fork link')
|
||||
return c
|
||||
|
||||
@LoginRequired()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue