feat(auth): enforce panel access check and notify inactive users

This commit is contained in:
Yoga Pangestu 2026-01-29 21:28:38 +07:00
parent dceeabdf7e
commit ac36fe3051
2 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,26 @@
---
description: Automatic commit message generator and fast AI-powered commit for all current changes
---
// turbo-all
This workflow automatically stages all changes, generates a descriptive commit message, and commits them in one go.
### Steps:
1. **Stage All Changes**: Automatically stage all modified and new files.
```bash
git add .
```
2. **Analyze Changes**: Get the diff of staged changes to understand the context.
```bash
git diff --cached
```
3. **Generate & Commit**: Generate a professional message following [Conventional Commits](https://www.conventionalcommits.org/) and execute the commit.
```bash
git commit -m "<ai_generated_message>"
```
4. **Push**: Optionally push the changes.
```bash
git push
```

View File

@ -91,6 +91,15 @@ public function authenticate(): ?LoginResponse
$this->throwFailureValidationException();
}
if ($user instanceof FilamentUser && (! $user->canAccessPanel(Filament::getCurrentOrDefaultPanel()))) {
CheerfulNotification::danger(
'Akun Tidak Aktif 🚫',
'Maaf, akun Anda saat ini tidak aktif. Silakan hubungi Administrator. 📞'
)->send();
throw ValidationException::withMessages([]);
}
if (
filled($this->userUndertakingMultiFactorAuthentication) &&
(decrypt($this->userUndertakingMultiFactorAuthentication) === $user->getAuthIdentifier())