Commit 61062b0d authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review

Merge "Bug 1824767: site template should not have the edit access section"

parents bbb1bea3 0e1d50d4
......@@ -10,7 +10,7 @@
<span class="btn-title">{str tag=editcontent1 section=view}</span>
</a>
{if !$accesssuspended && ($edittitle || $viewtype == 'share')}
{if !$accesssuspended && ($edittitle || $viewtype == 'share') && !$issitetemplate}
<a class="btn btn-secondary editviews editshare {if $selected == 'share'}active{/if}" href="{$WWWROOT}view/accessurl.php?id={$viewid}{if $collectionid}&collection={$collectionid}{/if}" title="{str tag=shareview1 section=view}">
<span class="icon icon-lg icon-unlock" aria-hidden="true" role="presentation"></span>
<span class="btn-title">{str tag=shareview1 section=view}</span>
......
......@@ -53,6 +53,9 @@ if (!$USER->can_edit_view($view)) {
if ($group && !group_within_edit_window($group)) {
throw new AccessDeniedException();
}
if ($view->get('template') == View::SITE_TEMPLATE) {
throw new AccessDeniedException();
}
$form = array(
......
......@@ -59,7 +59,9 @@ if (!$USER->can_edit_view($view)) {
if ($group && !group_within_edit_window($group)) {
throw new AccessDeniedException();
}
if ($view->get('template') == View::SITE_TEMPLATE) {
throw new AccessDeniedException();
}
$form = array(
'name' => 'accessurl',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment