Skip to content
Snippets Groups Projects
Commit 777eb342 authored by Kevin Ditscheid's avatar Kevin Ditscheid
Browse files

[TASK] Make CreateJob button on index page in backend module admin only

To prevent users from clicking the "Create New" button on the index
page of the backend module, we make this button admin only
parent f67dda6e
No related branches found
Tags 7.0.3
No related merge requests found
......@@ -103,6 +103,7 @@ class BackendController extends ActionController {
$this->view->assign('pageUid', $pageUid);
} else {
$this->view->assign('noRecords', 1);
$this->view->assign('isAdmin', $GLOBALS['BE_USER']->isAdmin());
$this->addFlashMessage(
LocalizationUtility::translate('backend.notice.noRecords', 'SgJobs'), '', FlashMessage::INFO
);
......
......@@ -53,7 +53,9 @@
</f:then>
<f:else>
<f:render partial="SelectRoot" arguments="{pages: pages}" />
<f:render partial="CreateJob" arguments="{pageUid:pageUid}" />
<f:if condition="{isAdmin}">
<f:render partial="CreateJob" arguments="{pageUid:pageUid}" />
</f:if>
</f:else>
</f:if>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment