Skip to content
Snippets Groups Projects
Commit 896d17c7 authored by Moritz Strohm's avatar Moritz Strohm Committed by David Siegfried
Browse files

allow access to resources/export for global resource users, closes #201

Closes #201

Merge request studip/studip!944
parent 2288b250
No related branches found
No related tags found
No related merge requests found
...@@ -58,7 +58,7 @@ class Resources_ExportController extends AuthenticatedController ...@@ -58,7 +58,7 @@ class Resources_ExportController extends AuthenticatedController
if (Navigation::hasItem('/resources/export/select_booking_sources')) { if (Navigation::hasItem('/resources/export/select_booking_sources')) {
Navigation::activateItem('/resources/export/select_booking_sources'); Navigation::activateItem('/resources/export/select_booking_sources');
} }
if (!ResourceManager::userHasGlobalPermission(User::findCurrent(), 'admin')) { if (!ResourceManager::userHasGlobalPermission(User::findCurrent())) {
throw new AccessDeniedException(); throw new AccessDeniedException();
} }
......
...@@ -216,7 +216,8 @@ class ResourceNavigation extends Navigation ...@@ -216,7 +216,8 @@ class ResourceNavigation extends Navigation
); );
$this->addSubNavigation('structure', $sub_navigation); $this->addSubNavigation('structure', $sub_navigation);
} }
if ($show_global_admin_actions) {
if ($user_is_global_resource_user) {
//Export tab: //Export tab:
$export_navigation = new Navigation( $export_navigation = new Navigation(
_('Export'), _('Export'),
...@@ -245,8 +246,8 @@ class ResourceNavigation extends Navigation ...@@ -245,8 +246,8 @@ class ResourceNavigation extends Navigation
) )
); );
$export_navigation->addSubNavigation('print_clipboard_rooms', $sub_nav); $export_navigation->addSubNavigation('print_clipboard_rooms', $sub_nav);
}
if ($show_global_admin_actions) {
//Mail tab: //Mail tab:
$messages_navigation = new Navigation( $messages_navigation = new Navigation(
......
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