Merge branch 'user_management' into dev
This commit is contained in:
@@ -66,6 +66,6 @@ class UserManagement extends Controller
|
||||
// refresh page with information about successfull registration
|
||||
return redirect()
|
||||
->route('users.new')
|
||||
->with('message', trans('admin/userManagement.registrationSuccessfull'));
|
||||
->with('success', trans('admin/userManagement.registrationSuccessfull'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,17 +7,6 @@ use App\Models\User;
|
||||
|
||||
class CreateNewUserRequest extends Request
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
|
||||
return \Auth::check() && \Auth::$user->role == User::ROLE_ADMIN;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
|
||||
@@ -6,5 +6,14 @@ use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
abstract class Request extends FormRequest
|
||||
{
|
||||
//
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user