Merge remote-tracking branch 'origin/develop'

This commit is contained in:
snipe 2016-08-01 18:44:32 -07:00
commit 2f679ccc29
2 changed files with 31 additions and 6 deletions

View file

@ -251,7 +251,7 @@ input[type='text'][disabled], input[disabled], textarea[disabled], input[readonl
<div class="col-md-5"> <div class="col-md-5">
<div class="controls"> <div class="controls">
<select name="groups[]" id="groups[]" multiple="multiple" class="form-control" {{ ((Config::get('app.lock_passwords') && ($user->id)) ? ' disabled' : '') }}> <select name="groups[]" id="groups[]" multiple="multiple" class="form-control" {{ ((Config::get('app.lock_passwords') || ($user->id==Auth::user()->id) || (!Auth::user()->isSuperUser())) ? ' disabled' : '') }}>
@foreach ($groups as $id => $group) @foreach ($groups as $id => $group)
<option value="{{ $id }}" <option value="{{ $id }}"
@ -291,6 +291,13 @@ input[type='text'][disabled], input[disabled], textarea[disabled], input[readonl
<div class="tab-pane" id="tab_2"> <div class="tab-pane" id="tab_2">
<div class="col-md-10 col-md-offset-2"> <div class="col-md-10 col-md-offset-2">
@if (!Auth::user()->isSuperUser())
<p class="alert alert-warning">Only superadmins may grant a user superadmin access.</p>
@endif
@foreach ($permissions as $area => $permission) @foreach ($permissions as $area => $permission)
@for ($i = 0; $i < count($permission); $i++) @for ($i = 0; $i < count($permission); $i++)
@ -306,15 +313,33 @@ input[type='text'][disabled], input[disabled], textarea[disabled], input[readonl
<div class="form-group" style="padding-left: 15px;"> <div class="form-group" style="padding-left: 15px;">
<label class="radio-padding"> <label class="radio-padding">
@if (($permission_name == 'superuser') && (!Auth::user()->isSuperUser()))
{{ Form::radio('permission['.$permission_name.']', '1', $userPermissions[$permission_name] == '1', ['class' => 'minimal', 'disabled'=>'disabled']) }}
@else
{{ Form::radio('permission['.$permission_name.']', '1', $userPermissions[$permission_name] == '1', ['class' => 'minimal']) }} {{ Form::radio('permission['.$permission_name.']', '1', $userPermissions[$permission_name] == '1', ['class' => 'minimal']) }}
@endif
Grant</label> Grant</label>
<label class="radio-padding"> <label class="radio-padding">
@if (($permission_name == 'superuser') && (!Auth::user()->isSuperUser()))
{{ Form::radio('permission['.$permission_name.']', '-1', $userPermissions[$permission_name] == '-1', ['class' => 'minimal', 'disabled'=>'disabled']) }}
@else
{{ Form::radio('permission['.$permission_name.']', '-1', $userPermissions[$permission_name] == '-1', ['class' => 'minimal']) }} {{ Form::radio('permission['.$permission_name.']', '-1', $userPermissions[$permission_name] == '-1', ['class' => 'minimal']) }}
@endif
Deny</label> Deny</label>
<label class="radio-padding"> <label class="radio-padding">
@if (($permission_name == 'superuser') && (!Auth::user()->isSuperUser()))
{{ Form::radio('permission['.$permission_name.']', '0', $userPermissions[$permission_name] =='0', ['class' => 'minimal', 'disabled'=>'disabled']) }}
@else
{{ Form::radio('permission['.$permission_name.']', '0', $userPermissions[$permission_name] =='0', ['class' => 'minimal']) }} {{ Form::radio('permission['.$permission_name.']', '0', $userPermissions[$permission_name] =='0', ['class' => 'minimal']) }}
@endif
Inherit</label> Inherit</label>
</div> </div>
<hr> <hr>