App kennt aktive Plugins (0.43.0)
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 6m39s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 6m12s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 7m26s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 7m7s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 9m56s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 10m12s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 8m58s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 8m52s
CI / Bekannte Sicherheitslücken in Paketen (pull_request) Successful in 48s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m9s

- /api/v1/me liefert „plugins“: aktive Plugins, die die Person nutzen darf
  (Rollen-Ausschluss beachtet) – die App blendet Nachrichten, Gruppen und
  Kleinanzeigen danach ein
- docs/API.md: Feld beschrieben, Hinweis auf die API der Kunden-Plugins

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Friederich Loheide 2026-09-27 20:24:06 +00:00
parent d693a29cbb
commit 9703a4c3f2
6 changed files with 19 additions and 6 deletions

View file

@ -29,7 +29,8 @@ class ApiTest extends TestCase
$token = $this->postJson('/api/v1/token', ['email' => 'ada@example.org', 'password' => 'geheim123', 'device_name' => 'iPhone'])
->assertCreated()->assertJsonPath('user.email', 'ada@example.org')->json('token');
$this->withToken($token)->getJson('/api/v1/me')->assertOk()->assertJsonPath('user.id', $user->id);
$plugins = $this->withToken($token)->getJson('/api/v1/me')->assertOk()->assertJsonPath('user.id', $user->id)->json('user.plugins');
$this->assertContains('news', $plugins);
$this->withToken($token)->deleteJson('/api/v1/token')->assertOk();
$this->app['auth']->forgetGuards();
$this->withToken($token)->getJson('/api/v1/me')->assertUnauthorized();