mirror of
https://github.com/Bubka/2FAuth.git
synced 2024-11-08 01:14:29 +01:00
Authorize FormRequests to authenticated user only
This commit is contained in:
parent
f5e632b4e5
commit
c8218c8cd7
@ -3,6 +3,7 @@
|
||||
namespace App\Api\v1\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
class GroupAssignRequest extends FormRequest
|
||||
{
|
||||
@ -13,7 +14,7 @@ class GroupAssignRequest extends FormRequest
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
return Auth::check();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -3,6 +3,7 @@
|
||||
namespace App\Api\v1\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
class GroupStoreRequest extends FormRequest
|
||||
{
|
||||
@ -13,7 +14,7 @@ class GroupStoreRequest extends FormRequest
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
return Auth::check();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -3,6 +3,7 @@
|
||||
namespace App\Api\v1\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
class QrCodeDecodeRequest extends FormRequest
|
||||
{
|
||||
@ -13,7 +14,7 @@ class QrCodeDecodeRequest extends FormRequest
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
return Auth::check();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -3,6 +3,7 @@
|
||||
namespace App\Api\v1\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
class SettingStoreRequest extends FormRequest
|
||||
{
|
||||
@ -13,7 +14,7 @@ class SettingStoreRequest extends FormRequest
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
return Auth::check();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -3,6 +3,7 @@
|
||||
namespace App\Api\v1\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
class SettingUpdateRequest extends FormRequest
|
||||
{
|
||||
@ -13,7 +14,7 @@ class SettingUpdateRequest extends FormRequest
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
return Auth::check();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -3,6 +3,7 @@
|
||||
namespace App\Api\v1\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
class TwoFAccountBatchRequest extends FormRequest
|
||||
{
|
||||
@ -13,7 +14,7 @@ class TwoFAccountBatchRequest extends FormRequest
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
return Auth::check();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
use Illuminate\Support\Arr;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
class TwoFAccountDynamicRequest extends FormRequest
|
||||
{
|
||||
@ -14,7 +15,7 @@ class TwoFAccountDynamicRequest extends FormRequest
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
return Auth::check();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -3,6 +3,7 @@
|
||||
namespace App\Api\v1\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
class TwoFAccountReorderRequest extends FormRequest
|
||||
{
|
||||
@ -13,7 +14,7 @@ class TwoFAccountReorderRequest extends FormRequest
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
return Auth::check();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -3,6 +3,7 @@
|
||||
namespace App\Api\v1\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
class TwoFAccountStoreRequest extends FormRequest
|
||||
{
|
||||
@ -13,7 +14,7 @@ class TwoFAccountStoreRequest extends FormRequest
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
return Auth::check();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -3,6 +3,7 @@
|
||||
namespace App\Api\v1\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
class TwoFAccountUpdateRequest extends FormRequest
|
||||
{
|
||||
@ -13,7 +14,7 @@ class TwoFAccountUpdateRequest extends FormRequest
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
return Auth::check();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -3,6 +3,7 @@
|
||||
namespace App\Api\v1\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
class TwoFAccountUriRequest extends FormRequest
|
||||
{
|
||||
@ -13,7 +14,7 @@ class TwoFAccountUriRequest extends FormRequest
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
return Auth::check();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -3,6 +3,7 @@
|
||||
namespace App\Api\v1\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
class UserPatchPwdRequest extends FormRequest
|
||||
{
|
||||
@ -13,7 +14,7 @@ class UserPatchPwdRequest extends FormRequest
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
return Auth::check();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -3,6 +3,7 @@
|
||||
namespace App\Api\v1\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
class UserUpdateRequest extends FormRequest
|
||||
{
|
||||
@ -13,7 +14,7 @@ class UserUpdateRequest extends FormRequest
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
return Auth::check();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user