Prevent the admin account being changed by non-admin users

This commit is contained in:
James Brooks
2015-01-10 09:21:55 +00:00
parent 5762905598
commit ac28264d94
2 changed files with 5 additions and 5 deletions

View File

@@ -14,11 +14,11 @@
<div class="col-sm-12">
@if($created = Session::get('created'))
<div class="alert alert-success">
{{ sprintf("<strong>%s</strong> %s", trans('dashboard.notifications.awesome'), trans('dashboard.team.add.success')) }}
{{ sprintf("<strong>%s</strong> %s", trans('dashboard.notifications.awesome'), trans('dashboard.team.add.success')) }}
</div>
@elseif($errors = Session::get('errors'))
<div class="alert alert-danger">
{{ sprintf("<strong>%s</strong> %s", trans('dashboard.notifications.whoops'), trans('dashboard.team.add.failure')) }}
{{ sprintf("<strong>%s</strong> %s", trans('dashboard.notifications.whoops'), trans('dashboard.team.add.failure')) }}
</div>
@endif

View File

@@ -15,9 +15,9 @@
@if($updated = Session::get('updated'))
<div class="alert alert-{{ $updated ? 'success' : 'danger' }}">
@if($updated)
{{ sprintf("<strong>%s</strong> %s", trans('dashboard.notifications.awesome'), trans('dashboard.team.edit.success')) }}
{{ sprintf("<strong>%s</strong> %s", trans('dashboard.notifications.awesome'), trans('dashboard.team.edit.success')) }}
@else
{{ sprintf("<strong>%s</strong> %s", trans('dashboard.notifications.whoops'), trans('dashboard.team.edit.failure')) }}
{{ sprintf("<strong>%s</strong> %s", trans('dashboard.notifications.whoops'), trans('dashboard.team.edit.failure')) }}
@endif
</div>
@endif
@@ -34,7 +34,7 @@
</div>
<div class="form-group">
<label>{{ trans('forms.user.password') }}</label>
<input type="password" class="form-control" name="password" value="" />
<input type="password" class="form-control" name="password" value="" {{ !Auth::user()->isAdmin ? "disabled": "" }} />
</div>
</fieldset>