Skip to content
Snippets Groups Projects
Commit ea9c0986 authored by Moritz Strohm's avatar Moritz Strohm Committed by Jan-Hendrik Willms
Browse files

allow users with room permissions to use the export tab in the resource management, re #1725

Merge request studip/studip!2023
parent 816c61be
No related branches found
No related tags found
No related merge requests found
Pipeline #15245 passed
......@@ -58,7 +58,10 @@ class Resources_ExportController extends AuthenticatedController
if (Navigation::hasItem('/resources/export/select_booking_sources')) {
Navigation::activateItem('/resources/export/select_booking_sources');
}
if (!ResourceManager::userHasGlobalPermission(User::findCurrent())) {
if (
!ResourceManager::userHasGlobalPermission(User::findCurrent())
&& !ResourceManager::userHasResourcePermissions(User::findCurrent(), 'user')
) {
throw new AccessDeniedException();
}
......
......@@ -210,7 +210,7 @@ class ResourceNavigation extends Navigation
$this->addSubNavigation('structure', $sub_navigation);
}
if ($user_is_global_resource_user) {
if ($user_has_rooms || $user_is_global_resource_user) {
//Export tab:
$export_navigation = new Navigation(
_('Export'),
......
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