-
-
Notifications
You must be signed in to change notification settings - Fork 607
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2828 from Leantime/userRoleIssues
Fixing user role issue for manager
- Loading branch information
Showing
10 changed files
with
72 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
{ | ||
"exclude": [ | ||
"storage/", | ||
"userfiles/" | ||
"userfiles/", | ||
"tests/Support/_generated" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,5 +77,4 @@ public function getBearerToken(): ?string | |
|
||
return null; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -285,5 +285,4 @@ public function isApiRequest(): bool | |
|
||
return str_starts_with($requestUri, '/api/jsonrpc'); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 23 additions & 19 deletions
42
app/Domain/Menu/Templates/partials/leftnav/item.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,24 @@ | ||
<li | ||
@if( | ||
$module == $menuItem['module'] | ||
&& (!isset($menuItem['active']) || in_array($action, $menuItem['active'])) | ||
) | ||
class='active' | ||
@endif | ||
> | ||
<a href="{{ BASE_URL . $menuItem['href'] }}" | ||
data-tippy-content="{{ strip_tags(__($menuItem['tooltip'])) }}" | ||
data-tippy-placement="right" | ||
@if(isset($menuItem['attributes'])) | ||
@foreach($menuItem['attributes'] as $key => $value) | ||
{{ $key }}="{{ $value }}" | ||
@endforeach | ||
@endif | ||
@if(!isset($menuItem['role']) || $login::userIsAtLeast($menuItem['role'] ?? 'editor')) | ||
|
||
<li | ||
@if( | ||
$module == $menuItem['module'] | ||
&& (!isset($menuItem['active']) || in_array($action, $menuItem['active'])) | ||
) | ||
class='active' | ||
@endif | ||
> | ||
{!! $menuItem['title'] !!} | ||
</a> | ||
</li> | ||
<a href="{{ BASE_URL . $menuItem['href'] }}" | ||
data-tippy-content="{{ strip_tags(__($menuItem['tooltip'])) }}" | ||
data-tippy-placement="right" | ||
@if(isset($menuItem['attributes'])) | ||
@foreach($menuItem['attributes'] as $key => $value) | ||
{{ $key }}="{{ $value }}" | ||
@endforeach | ||
@endif | ||
> | ||
{!! $menuItem['title'] !!} | ||
</a> | ||
</li> | ||
|
||
@endif |
48 changes: 26 additions & 22 deletions
48
app/Domain/Menu/Templates/partials/leftnav/submenu.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,27 @@ | ||
<li class="submenuToggle"> | ||
<a href="javascript:void(0);" | ||
@if ( $menuItem['visual'] !== 'always' ) | ||
onclick="leantime.menuController.toggleSubmenu('{{ $menuItem['id'] }}')" | ||
@endif | ||
> | ||
<i class="submenuCaret fa fa-angle-{{ $menuItem['visual'] == 'closed' ? 'right' : 'down' }}" | ||
id="submenu-icon-{{ $menuItem['id'] }}"></i> | ||
<strong>{!! __($menuItem['title']) !!}</strong> | ||
</a> | ||
</li> | ||
<ul id="submenu-{{ $menuItem['id'] }}" class="submenu {{ $menuItem['visual'] == 'closed' ? 'closed' : 'open' }}"> | ||
@foreach ($menuItem['submenu'] as $subkey => $submenuItem) | ||
@switch ($submenuItem['type']) | ||
@case('header') | ||
@include("menu::partials.leftnav.header", ["menuItem" => $submenuItem, "module" => $module, "action" => $action]) | ||
@break | ||
@case('item') | ||
@include("menu::partials.leftnav.item", ["menuItem" => $submenuItem, "module" => $module, "action" => $action]) | ||
@endswitch | ||
@endforeach | ||
</ul> | ||
@if(!isset($menuItem['role']) || $login::userIsAtLeast($menuItem['role'] ?? 'editor')) | ||
|
||
<li class="submenuToggle"> | ||
<a href="javascript:void(0);" | ||
@if ( $menuItem['visual'] !== 'always' ) | ||
onclick="leantime.menuController.toggleSubmenu('{{ $menuItem['id'] }}')" | ||
@endif | ||
> | ||
<i class="submenuCaret fa fa-angle-{{ $menuItem['visual'] == 'closed' ? 'right' : 'down' }}" | ||
id="submenu-icon-{{ $menuItem['id'] }}"></i> | ||
<strong>{!! __($menuItem['title']) !!}</strong> | ||
</a> | ||
</li> | ||
<ul id="submenu-{{ $menuItem['id'] }}" class="submenu {{ $menuItem['visual'] == 'closed' ? 'closed' : 'open' }}"> | ||
@foreach ($menuItem['submenu'] as $subkey => $submenuItem) | ||
@switch ($submenuItem['type']) | ||
@case('header') | ||
@include("menu::partials.leftnav.header", ["menuItem" => $submenuItem, "module" => $module, "action" => $action]) | ||
@break | ||
@case('item') | ||
@include("menu::partials.leftnav.item", ["menuItem" => $submenuItem, "module" => $module, "action" => $action]) | ||
@endswitch | ||
@endforeach | ||
</ul> | ||
|
||
@endif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters