feat(auth): enforce panel access check and notify inactive users
This commit is contained in:
parent
dceeabdf7e
commit
ac36fe3051
26
.agent/workflows/commit.md
Normal file
26
.agent/workflows/commit.md
Normal 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
|
||||||
|
```
|
||||||
@ -91,6 +91,15 @@ public function authenticate(): ?LoginResponse
|
|||||||
$this->throwFailureValidationException();
|
$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 (
|
if (
|
||||||
filled($this->userUndertakingMultiFactorAuthentication) &&
|
filled($this->userUndertakingMultiFactorAuthentication) &&
|
||||||
(decrypt($this->userUndertakingMultiFactorAuthentication) === $user->getAuthIdentifier())
|
(decrypt($this->userUndertakingMultiFactorAuthentication) === $user->getAuthIdentifier())
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user