Enable sysops to update their own BBS details
This commit is contained in:
parent
fdbc58856b
commit
fa3653a94b
@ -244,7 +244,7 @@ class SystemController extends Controller
|
||||
public function add_session(Request $request,System $o)
|
||||
{
|
||||
// @todo This should be admin of the zone
|
||||
$this->authorize('admin',$o);
|
||||
$this->authorize('update',$o);
|
||||
session()->flash('accordion','session');
|
||||
|
||||
$validate = $request->validate([
|
||||
|
@ -1,3 +1,4 @@
|
||||
<!-- $o = System::class -->
|
||||
@if(($x=\App\Models\Zone::active()
|
||||
->whereIn('id',$o->zones->pluck('id'))
|
||||
->whereNotIn('id',$o->sessions->pluck('id'))
|
||||
@ -42,7 +43,7 @@
|
||||
<label for="sespass" class="form-label">Session Password</label>
|
||||
<div class="input-group has-validation">
|
||||
<span class="input-group-text"><i class="bi bi-lock"></i></span>
|
||||
<input type="text" style="width: 35%;" class="form-control @error('sespass') is-invalid @enderror" id="sespass" placeholder="Session" name="sespass" value="{{ old('sespass') }}" @cannot('admin',$o)disabled @endcannot required>
|
||||
<input type="text" style="width: 35%;" class="form-control @error('sespass') is-invalid @enderror" id="sespass" placeholder="Session" name="sespass" value="{{ old('sespass') }}" @cannot('update',$o)disabled @endcannot required>
|
||||
<span class="invalid-feedback" role="alert">
|
||||
@error('sespass')
|
||||
{{ $message }}
|
||||
@ -58,7 +59,7 @@
|
||||
<label for="pktpass" class="form-label">Packet Password</label>
|
||||
<div class="input-group has-validation">
|
||||
<span class="input-group-text"><i class="bi bi-box"></i></span>
|
||||
<input type="text" style="width: 35%;" class="form-control @error('pktpass') is-invalid @enderror" id="pktpass" placeholder="Packet" name="pktpass" value="{{ old('pktpass') }}" @cannot('admin',$o)disabled @endcannot>
|
||||
<input type="text" style="width: 35%;" class="form-control @error('pktpass') is-invalid @enderror" id="pktpass" placeholder="Packet" name="pktpass" value="{{ old('pktpass') }}" @cannot('update',$o)disabled @endcannot>
|
||||
<span class="invalid-feedback" role="alert">
|
||||
@error('pktpass')
|
||||
{{ $message }}
|
||||
@ -74,7 +75,7 @@
|
||||
<label for="fixpass" class="form-label">Areafix Password</label>
|
||||
<div class="input-group has-validation">
|
||||
<span class="input-group-text"><i class="bi bi-card-text"></i></span>
|
||||
<input type="text" style="width: 35%;" class="form-control @error('fixpass') is-invalid @enderror" id="fixpass" placeholder="Areafix" name="fixpass" value="{{ old('fixpass') }}" @cannot('admin',$o)disabled @endcannot required>
|
||||
<input type="text" style="width: 35%;" class="form-control @error('fixpass') is-invalid @enderror" id="fixpass" placeholder="Areafix" name="fixpass" value="{{ old('fixpass') }}" @cannot('update',$o)disabled @endcannot required>
|
||||
<span class="invalid-feedback" role="alert">
|
||||
@error('fixpass')
|
||||
{{ $message }}
|
||||
@ -90,7 +91,7 @@
|
||||
<label for="ticpass" class="form-label">TIC Password</label>
|
||||
<div class="input-group has-validation">
|
||||
<span class="input-group-text"><i class="bi bi-archive"></i></span>
|
||||
<input type="text" style="width: 35%;" class="form-control @error('ticpass') is-invalid @enderror" id="ticpass" placeholder="TIC" name="ticpass" value="{{ old('ticpass') }}" @cannot('admin',$o)disabled @endcannot>
|
||||
<input type="text" style="width: 35%;" class="form-control @error('ticpass') is-invalid @enderror" id="ticpass" placeholder="TIC" name="ticpass" value="{{ old('ticpass') }}" @cannot('update',$o)disabled @endcannot>
|
||||
<span class="invalid-feedback" role="alert">
|
||||
@error('ticpass')
|
||||
{{ $message }}
|
||||
@ -114,7 +115,7 @@
|
||||
@endif
|
||||
</span>
|
||||
|
||||
@can('admin',$o)
|
||||
@can('update',$o)
|
||||
<div class="col-2">
|
||||
<button type="submit" name="submit" class="btn btn-success float-end">Add</button>
|
||||
</div>
|
||||
|
@ -36,7 +36,7 @@
|
||||
@endif
|
||||
</span>
|
||||
|
||||
@can('admin',$o)
|
||||
@can('update',$o)
|
||||
<div class="col-2">
|
||||
<button type="submit" name="submit" class="btn btn-success float-end">Add</button>
|
||||
</div>
|
||||
|
@ -36,7 +36,7 @@
|
||||
@endif
|
||||
</span>
|
||||
|
||||
@can('admin',$o)
|
||||
@can('update',$o)
|
||||
<div class="col-2">
|
||||
<button type="submit" name="submit" class="btn btn-success float-end">Add</button>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user