Skip to content
Snippets Groups Projects
Commit f0385bd6 authored by André Noack's avatar André Noack Committed by Elmar Ludwig
Browse files

fix #34

parent 9ce15183
No related branches found
No related tags found
No related merge requests found
...@@ -66,24 +66,11 @@ echo $flash['message']; ...@@ -66,24 +66,11 @@ echo $flash['message'];
) ?> ) ?>
<?php <?php
$user_has_permissions = false; $user_has_permissions = ResourceManager::userHasGlobalPermission($current_user, 'admin');
if ($rr->room && !$GLOBALS['perm']->have_perm('root')) { if ($rr->room && !$user_has_permissions) {
$user_has_permissions = ( $user_has_permissions = $rr->room->userHasPermission($current_user, 'admin');
$rr->room->userHasPermission($current_user, 'admin') && }
(RoomRequest::countBySql( ?>
"id = :request_id
AND closed = '0'
AND user_id = :user_id",
[
'request_id' => $rr->id,
'user_id' => $current_user->id
]
) > 0
)
);
} else {
$user_has_permissions = ResourceManager::userHasGlobalPermission($current_user, 'admin');
} ?>
<? if ($user_has_permissions && (int)$rr->closed === 0): ?> <? if ($user_has_permissions && (int)$rr->closed === 0): ?>
<? $actionMenu->addLink( <? $actionMenu->addLink(
...@@ -141,4 +128,4 @@ echo $flash['message']; ...@@ -141,4 +128,4 @@ echo $flash['message'];
['data-dialog' => 'size=big'] ['data-dialog' => 'size=big']
) ?> ) ?>
</div> </div>
<? endif ?> <? endif ?>
\ No newline at end of file
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