Skip to content

Commit

Permalink
Fix bug with AuthHelper implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonhasacat committed Mar 27, 2024
1 parent c8a2c36 commit 922a18e
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 31 deletions.
14 changes: 7 additions & 7 deletions resources/views/help/list.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

@section('content')
<div class="container">
@if(\App\Classes\AuthHelper::authACL()->isFacilityStaff()
|| \App\Classes\AuthHelper::authACL()->isInstructor()
|| \App\Classes\AuthHelper::authACL()->isVATUSAStaff()
|| \App\Classes\AuthHelper::authACL()->isWebTeam())
@if(\App\Helpers\AuthHelper::authACL()->isFacilityStaff()
|| \App\Helpers\AuthHelper::authACL()->isInstructor()
|| \App\Helpers\AuthHelper::authACL()->isVATUSAStaff()
|| \App\Helpers\AuthHelper::authACL()->isWebTeam())
<div class="row">
<div class="col-lg-12 text-center">
<a href="/help/ticket/myassigned" class="btn btn-primary">My Assigned Tickets</a>
Expand All @@ -26,7 +26,7 @@
<thead>
<tr>
<th class="fit">ID</th>
@if(\App\Classes\AuthHelper::authACL()->isVATUSAStaff())
@if(\App\Helpers\AuthHelper::authACL()->isVATUSAStaff())
<th class="fit">Facility</th>
@endif
<th>Subject</th>
Expand All @@ -39,12 +39,12 @@
</thead>
<tbody>
@if(count($tickets)==0)
<tr><td colspan="{{(\App\Classes\AuthHelper::authACL()->isVATUSAStaff()?"8":"7")}}" class="text-center"><i>No {{$status}} to display</i></td></tr>
<tr><td colspan="{{(\App\Helpers\AuthHelper::authACL()->isVATUSAStaff()?"8":"7")}}" class="text-center"><i>No {{$status}} to display</i></td></tr>
@else
@foreach($tickets as $ticket)
<tr class="clickable-row ticket-{{strtolower($ticket->status)}}" data-href="/help/ticket/{{$ticket->id}}">
<td>{{$ticket->id}}</td>
@if(\App\Classes\AuthHelper::authACL()->isVATUSAStaff())
@if(\App\Helpers\AuthHelper::authACL()->isVATUSAStaff())
<td>{{$ticket->facility}}</td>
@endif
<td>{{$ticket->subject}}</td>
Expand Down
14 changes: 7 additions & 7 deletions resources/views/help/listclosed.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

@section('content')
<div class="container">
@if(\App\Classes\AuthHelper::authACL()->isFacilityStaff() ||
\App\Classes\AuthHelper::authACL()->isInstructor() ||
\App\Classes\AuthHelper::authACL()->isVATUSAStaff() ||
\App\Classes\AuthHelper::authACL()->isWebTeam()
@if(\App\Helpers\AuthHelper::authACL()->isFacilityStaff() ||
\App\Helpers\AuthHelper::authACL()->isInstructor() ||
\App\Helpers\AuthHelper::authACL()->isVATUSAStaff() ||
\App\Helpers\AuthHelper::authACL()->isWebTeam()
)
<div class="row">
<div class="col-lg-12 text-center">
Expand Down Expand Up @@ -53,7 +53,7 @@ class="btn btn-primary">Next</a>
<i class="fas fa-arrows-alt-v"></i>
@endif
</a></th>
@if(\App\Classes\AuthHelper::authACL()->isVATUSAStaff())
@if(\App\Helpers\AuthHelper::authACL()->isVATUSAStaff())
<th class="fit"><a
href="/help/ticket/closed?sort=facility&dir={{($sort == "facility")?$osortdir:"desc"}}&page=1">Facility
@if($sort == "facility")
Expand Down Expand Up @@ -89,15 +89,15 @@ class="btn btn-primary">Next</a>
<tbody>
@if(count($tickets)==0)
<tr>
<td colspan="{{(\App\Classes\AuthHelper::authACL()->isVATUSAStaff()?"8":"7")}}"
<td colspan="{{(\App\Helpers\AuthHelper::authACL()->isVATUSAStaff()?"8":"7")}}"
class="text-center"><i>No {{$status}} to display</i></td>
</tr>
@else
@foreach($tickets as $ticket)
<tr class="clickable-row ticket-{{strtolower($ticket->status)}}"
data-href="/help/ticket/{{$ticket->id}}">
<td>{{$ticket->id}}</td>
@if(\App\Classes\AuthHelper::authACL()->isVATUSAStaff())
@if(\App\Helpers\AuthHelper::authACL()->isVATUSAStaff())
<td>{{$ticket->facility}}</td>
@endif
<td>{{$ticket->subject}}</td>
Expand Down
8 changes: 4 additions & 4 deletions resources/views/help/openticket.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@
</select>
</div>
</div>
@if(\App\Classes\AuthHelper::authACL()->isFacilityStaff() ||
\App\Classes\AuthHelper::authACL()->isVATUSAStaff() ||
\App\Classes\AuthHelper::authACL()->isWebTeam()
@if(\App\Helpers\AuthHelper::authACL()->isFacilityStaff() ||
\App\Helpers\AuthHelper::authACL()->isVATUSAStaff() ||
\App\Helpers\AuthHelper::authACL()->isWebTeam()
)
<div class="form-group">
<label for="tAssign" class="col-sm-2 control-label">Assign To</label>
Expand Down Expand Up @@ -66,7 +66,7 @@ class="fa fa-envelope-o"></i> Open Ticket
</form>
</div>
</div>
@if(\App\Classes\AuthHelper::authACL()->isFacilityStaff() || \App\Classes\AuthHelper::authACL()->isVATUSAStaff())
@if(\App\Helpers\AuthHelper::authACL()->isFacilityStaff() || \App\Helpers\AuthHelper::authACL()->isVATUSAStaff())
<script type="text/javascript">
$('#tFacility').change(function () {
if ($('#tFacility').val() == 'ZAE') {
Expand Down
8 changes: 4 additions & 4 deletions resources/views/help/search.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
@section('title', 'Search Tickets')
@section('content')
<div class="container">
@if(\App\Classes\AuthHelper::authACL()->isFacilityStaff() ||
\App\Classes\AuthHelper::authACL()->isInstructor() ||
\App\Classes\AuthHelper::authACL()->isVATUSAStaff() ||
\App\Classes\AuthHelper::authACL()->isWebTeam()
@if(\App\Helpers\AuthHelper::authACL()->isFacilityStaff() ||
\App\Helpers\AuthHelper::authACL()->isInstructor() ||
\App\Helpers\AuthHelper::authACL()->isVATUSAStaff() ||
\App\Helpers\AuthHelper::authACL()->isWebTeam()
)
<div class="row">
<div class="col-lg-12 text-center">
Expand Down
8 changes: 4 additions & 4 deletions resources/views/help/viewticket.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

@section('content')
<div class="container">
@if(\App\Classes\AuthHelper::authACL()->isFacilityStaff() ||
\App\Classes\AuthHelper::authACL()->isInstructor() ||
\App\Classes\AuthHelper::authACL()->isVATUSAStaff() ||
\App\Classes\AuthHelper::authACL()->isWebTeam()
@if(\App\Helpers\AuthHelper::authACL()->isFacilityStaff() ||
\App\Helpers\AuthHelper::authACL()->isInstructor() ||
\App\Helpers\AuthHelper::authACL()->isVATUSAStaff() ||
\App\Helpers\AuthHelper::authACL()->isWebTeam()
)
<div class="row">
<div class="col-lg-12 text-center">
Expand Down
8 changes: 4 additions & 4 deletions resources/views/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ class="fa fa-share-square"></i></a></h3>
</div>
<div class="panel-body">
<section>
@if(\App\Classes\AuthHelper::authACL()->isFacilityStaff() ||
\App\Classes\AuthHelper::authACL()->isInstructor() ||
\App\Classes\AuthHelper::authACL()->isVATUSAStaff())
@if(\App\Helpers\AuthHelper::authACL()->isFacilityStaff() ||
\App\Helpers\AuthHelper::authACL()->isInstructor() ||
\App\Helpers\AuthHelper::authACL()->isVATUSAStaff())
<div class="text-center">
<a href="{{ url("/mgt/tmu#notices") }}">
<button class="btn btn-default"><i class="fa fa-pencil-alt"></i>
Edit @if(!\App\Classes\AuthHelper::authACL()->isVATUSAStaff()) {{ \Illuminate\Support\Facades\Auth::user()->facility }} @endif
Edit @if(!\App\Helpers\AuthHelper::authACL()->isVATUSAStaff()) {{ \Illuminate\Support\Facades\Auth::user()->facility }} @endif
Notices
</button>
</a>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/mgt/solo.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<td>{{$cert->position}}</td>
<td>{{$cert->expires}}</td>
<td>
@if($cert->user->facility == Auth::user()->facility || \App\Classes\AuthHelper::authACL()->isVATUSAStaff())
@if($cert->user->facility == Auth::user()->facility || \App\Helpers\AuthHelper::authACL()->isVATUSAStaff())
<button type="button" class="btn btn-danger delete-solo" data-id="{{ $cert->id }}">
<i class="fa fa-times"></i></button>
@else
Expand Down

0 comments on commit 922a18e

Please sign in to comment.