Merge pull request #4032 from angelej/force-password-reset-authorization
Add authorization for force-password-resets
This commit is contained in:
commit
26ab73b330
1 changed files with 7 additions and 0 deletions
|
|
@ -24,6 +24,9 @@ class ForcePasswordReset extends Component
|
||||||
|
|
||||||
public function mount()
|
public function mount()
|
||||||
{
|
{
|
||||||
|
if (auth()->user()->force_password_reset === false) {
|
||||||
|
return redirect()->route('dashboard');
|
||||||
|
}
|
||||||
$this->email = auth()->user()->email;
|
$this->email = auth()->user()->email;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -34,6 +37,10 @@ public function render()
|
||||||
|
|
||||||
public function submit()
|
public function submit()
|
||||||
{
|
{
|
||||||
|
if (auth()->user()->force_password_reset === false) {
|
||||||
|
return redirect()->route('dashboard');
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$this->rateLimit(10);
|
$this->rateLimit(10);
|
||||||
$this->validate();
|
$this->validate();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue