Move security evaluations for File/Echoareas back to model
This commit is contained in:
@@ -56,12 +56,12 @@
|
||||
->sortBy('name')) as $o)
|
||||
<tr>
|
||||
<th class="nowrap">
|
||||
<a href="{{ url('domain/view',[$o->id]) }}">{{ $o->name }}</a> <small>({{ $sec=$user->systems->pluck('akas')->flatten()->filter(function($item) use ($o) { return $item->zone->domain_id === $o->id; })->max('security') ?? '-' }})</small><br><br>
|
||||
<a href="{{ url('domain/view',[$o->id]) }}">{{ $o->name }}</a> <small>({{ ($sec=$user->systems->pluck('akas')->flatten()->filter(function($item) use ($o) { return $item->zone->domain_id === $o->id; })->max('security') ?: 0) ?? '-' }})</small><br><br>
|
||||
{{ ($sub=$user->systems->pluck('akas')->flatten()->pluck('echoareas')->flatten()->filter(function($item) use ($o) { return $item->domain_id === $o->id; }))->count() }} <small>Subscribed</small>
|
||||
</th>
|
||||
<td>
|
||||
@foreach ($o->echoareas->sortBy('name') as $eo)
|
||||
<span style="@if (($sec < $eo->sec_read) || ($sec < $eo->sec_write) || ! $eo->active) color: red; @elseif($sub->where('name',$eo->name)->count()) color: green; @endif">{{ $eo->name }}</span>
|
||||
<span style="@if(! $eo->active) color: gray; @elseif(! $eo->can_access($sec)) color: red; @elseif($sub->where('name',$eo->name)->count()) color: green; @endif">{{ $eo->name }}</span>
|
||||
@endforeach
|
||||
</td>
|
||||
</tr>
|
||||
@@ -113,6 +113,7 @@
|
||||
--}}
|
||||
</style>
|
||||
@append
|
||||
|
||||
@section('page-scripts')
|
||||
@js('highcharts')
|
||||
|
||||
|
Reference in New Issue
Block a user