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)
|
public function add_session(Request $request,System $o)
|
||||||
{
|
{
|
||||||
// @todo This should be admin of the zone
|
// @todo This should be admin of the zone
|
||||||
$this->authorize('admin',$o);
|
$this->authorize('update',$o);
|
||||||
session()->flash('accordion','session');
|
session()->flash('accordion','session');
|
||||||
|
|
||||||
$validate = $request->validate([
|
$validate = $request->validate([
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
<!-- $o = System::class -->
|
||||||
@if(($x=\App\Models\Zone::active()
|
@if(($x=\App\Models\Zone::active()
|
||||||
->whereIn('id',$o->zones->pluck('id'))
|
->whereIn('id',$o->zones->pluck('id'))
|
||||||
->whereNotIn('id',$o->sessions->pluck('id'))
|
->whereNotIn('id',$o->sessions->pluck('id'))
|
||||||
@ -42,7 +43,7 @@
|
|||||||
<label for="sespass" class="form-label">Session Password</label>
|
<label for="sespass" class="form-label">Session Password</label>
|
||||||
<div class="input-group has-validation">
|
<div class="input-group has-validation">
|
||||||
<span class="input-group-text"><i class="bi bi-lock"></i></span>
|
<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">
|
<span class="invalid-feedback" role="alert">
|
||||||
@error('sespass')
|
@error('sespass')
|
||||||
{{ $message }}
|
{{ $message }}
|
||||||
@ -58,7 +59,7 @@
|
|||||||
<label for="pktpass" class="form-label">Packet Password</label>
|
<label for="pktpass" class="form-label">Packet Password</label>
|
||||||
<div class="input-group has-validation">
|
<div class="input-group has-validation">
|
||||||
<span class="input-group-text"><i class="bi bi-box"></i></span>
|
<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">
|
<span class="invalid-feedback" role="alert">
|
||||||
@error('pktpass')
|
@error('pktpass')
|
||||||
{{ $message }}
|
{{ $message }}
|
||||||
@ -74,7 +75,7 @@
|
|||||||
<label for="fixpass" class="form-label">Areafix Password</label>
|
<label for="fixpass" class="form-label">Areafix Password</label>
|
||||||
<div class="input-group has-validation">
|
<div class="input-group has-validation">
|
||||||
<span class="input-group-text"><i class="bi bi-card-text"></i></span>
|
<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">
|
<span class="invalid-feedback" role="alert">
|
||||||
@error('fixpass')
|
@error('fixpass')
|
||||||
{{ $message }}
|
{{ $message }}
|
||||||
@ -90,7 +91,7 @@
|
|||||||
<label for="ticpass" class="form-label">TIC Password</label>
|
<label for="ticpass" class="form-label">TIC Password</label>
|
||||||
<div class="input-group has-validation">
|
<div class="input-group has-validation">
|
||||||
<span class="input-group-text"><i class="bi bi-archive"></i></span>
|
<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">
|
<span class="invalid-feedback" role="alert">
|
||||||
@error('ticpass')
|
@error('ticpass')
|
||||||
{{ $message }}
|
{{ $message }}
|
||||||
@ -114,7 +115,7 @@
|
|||||||
@endif
|
@endif
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
@can('admin',$o)
|
@can('update',$o)
|
||||||
<div class="col-2">
|
<div class="col-2">
|
||||||
<button type="submit" name="submit" class="btn btn-success float-end">Add</button>
|
<button type="submit" name="submit" class="btn btn-success float-end">Add</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
@endif
|
@endif
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
@can('admin',$o)
|
@can('update',$o)
|
||||||
<div class="col-2">
|
<div class="col-2">
|
||||||
<button type="submit" name="submit" class="btn btn-success float-end">Add</button>
|
<button type="submit" name="submit" class="btn btn-success float-end">Add</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
@endif
|
@endif
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
@can('admin',$o)
|
@can('update',$o)
|
||||||
<div class="col-2">
|
<div class="col-2">
|
||||||
<button type="submit" name="submit" class="btn btn-success float-end">Add</button>
|
<button type="submit" name="submit" class="btn btn-success float-end">Add</button>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user