Skip to content
This repository has been archived by the owner on Jun 23, 2020. It is now read-only.

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
tanwencn committed Apr 29, 2020
1 parent eb12824 commit 2b3e9c6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion resources/views/_auth/login.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<div class="form-group has-feedback {!! !$errors->has('password') ?: 'has-error' !!}">

@if($errors->has('password'))
<label class="control-label" for="inputError"><i class="fa fa-times-circle-o"></i>{{$errors->first(password)}}</label></br>
<label class="control-label" for="inputError"><i class="fa fa-times-circle-o"></i>{{$errors->first('password')}}</label></br>
@endif

<input type="password" class="form-control" placeholder="{{ trans('admin.password') }}" name="password">
Expand Down
2 changes: 1 addition & 1 deletion src/Http/Controllers/PermissionController.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public function destroy($id, Request $request)
}

protected function hasAlreadyPermission($model){
abort_unless(Auth::user()->hasPermissionTo(intval($model->id)), 402, "you is no permission id {$model->name}");
if($model->id) abort_unless(Auth::user()->hasPermissionTo(intval($model->id)), 402, "you is no permission id {$model->name}");
}

protected function abilitiesMap()
Expand Down

0 comments on commit 2b3e9c6

Please sign in to comment.