更新 'src/Http/Auth/Permission.php'
parent
f45495b6fb
commit
0f60563460
|
|
@ -86,7 +86,7 @@ class Permission
|
||||||
*
|
*
|
||||||
* @throws \Illuminate\Http\Exceptions\HttpResponseException
|
* @throws \Illuminate\Http\Exceptions\HttpResponseException
|
||||||
*/
|
*/
|
||||||
public static function error()
|
public static function error($ability = null)
|
||||||
{
|
{
|
||||||
if ($error = static::$errorHandler) {
|
if ($error = static::$errorHandler) {
|
||||||
admin_exit($error());
|
admin_exit($error());
|
||||||
|
|
@ -97,7 +97,7 @@ class Permission
|
||||||
}
|
}
|
||||||
|
|
||||||
admin_exit(
|
admin_exit(
|
||||||
Content::make()->withError(trans('admin.deny'))
|
Content::make()->withError(trans('admin.deny') . ':' . $ability)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue