mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 13:44:06 -08:00
Merge remote-tracking branch 'origin/develop'
This commit is contained in:
commit
2f679ccc29
|
@ -251,7 +251,7 @@ input[type='text'][disabled], input[disabled], textarea[disabled], input[readonl
|
|||
<div class="col-md-5">
|
||||
<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)
|
||||
<option value="{{ $id }}"
|
||||
|
@ -290,6 +290,13 @@ input[type='text'][disabled], input[disabled], textarea[disabled], input[readonl
|
|||
</div><!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="tab_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)
|
||||
|
||||
|
@ -306,16 +313,34 @@ input[type='text'][disabled], input[disabled], textarea[disabled], input[readonl
|
|||
<div class="form-group" style="padding-left: 15px;">
|
||||
|
||||
<label class="radio-padding">
|
||||
{{ Form::radio('permission['.$permission_name.']', '1', $userPermissions[$permission_name] == '1', ['class' => 'minimal']) }}
|
||||
|
||||
@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']) }}
|
||||
@endif
|
||||
|
||||
Grant</label>
|
||||
|
||||
<label class="radio-padding">
|
||||
{{ Form::radio('permission['.$permission_name.']', '-1', $userPermissions[$permission_name] == '-1', ['class' => 'minimal']) }}
|
||||
|
||||
@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']) }}
|
||||
|
||||
@endif
|
||||
Deny</label>
|
||||
|
||||
<label class="radio-padding">
|
||||
{{ Form::radio('permission['.$permission_name.']', '0', $userPermissions[$permission_name] =='0', ['class' => 'minimal']) }}
|
||||
Inherit</label>
|
||||
@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']) }}
|
||||
@endif
|
||||
|
||||
Inherit</label>
|
||||
</div>
|
||||
<hr>
|
||||
@endif
|
||||
|
|
|
@ -51,7 +51,7 @@ elif [ -f /etc/os-release ]; then
|
|||
#Order is important here. If /etc/os-release and /etc/centos-release exist, we're on centos 7.
|
||||
#If only /etc/centos-release exist, we're on centos6(or earlier). Centos-release is less parsable,
|
||||
#so lets assume that it's version 6 (Plus, who would be doing a new install of anything on centos5 at this point..)
|
||||
elif [ -f /etc/centos-release]; then
|
||||
elif [ -f /etc/centos-release ]; then
|
||||
distro="Centos"
|
||||
version="6"
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue