mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-app.git
synced 2026-06-27 07:30:23 +00:00
✨ Add Super-Admin tools for managing any model
- 🛠️ Introduced generic Super-Admin MCP tools, including `list-models`, `describe-model`, `list-records`, `show-record`, `create-record`, and `update-record`. - 🛡️ Restricted modification of critical fields (e.g., passwords, roles, tokens) to enhance security. - ✅ Added extensive feature tests for Super-Admin functionality and access control. - 📜 Increased pagination length to accommodate new tools on a single page. - 🔗 Registered Super-Admin tools in `EinundzwanzigServer`.
This commit is contained in:
@@ -76,6 +76,27 @@ it('completes a Lightning login and redirects to the dashboard when a recent Log
|
||||
$this->assertAuthenticatedAs($user);
|
||||
});
|
||||
|
||||
it('resumes the intended OAuth url after a Lightning login instead of going to the dashboard', function () {
|
||||
$user = User::factory()->create();
|
||||
$k1 = bin2hex(random_bytes(32));
|
||||
LoginKey::factory()->create([
|
||||
'user_id' => $user->id,
|
||||
'k1' => $k1,
|
||||
'created_at' => now(),
|
||||
]);
|
||||
|
||||
$intended = url('/oauth/authorize?client_id=1&response_type=code&scope=mcp:use');
|
||||
|
||||
$response = $this->withSession([
|
||||
'lang_country' => 'de-DE',
|
||||
'locale' => 'de',
|
||||
'url.intended' => $intended,
|
||||
])->get(route('auth.ln.complete', ['k1' => $k1]));
|
||||
|
||||
$response->assertRedirect($intended);
|
||||
$this->assertAuthenticatedAs($user);
|
||||
});
|
||||
|
||||
it('redirects to login when the LoginKey is older than 5 minutes', function () {
|
||||
$user = User::factory()->create();
|
||||
$k1 = bin2hex(random_bytes(32));
|
||||
|
||||
Reference in New Issue
Block a user