Kontingente: sehen und nutzen getrennt; Admins rechnen eigene Keys nicht über fremde ab
- Actor::may_use_quota: zugeteilt oder selbst angelegt (System immer); may_see_quota: zusätzlich alles, was man verwaltet - QuotaInfo.usable; die Key-Auswahl zeigt nur nutzbare Kontingente Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
698249cb9b
commit
55116414e3
4 files changed
+31
-6
No files matched your search
@@ -337,6 +337,16 @@ async function flows(fail) {
|
||||
expect(['für die Gruppe gemeinsam', 'Modelle: ollama/smollm2:135m', 'wöchentlich mo,mi 08:00-18:00', 'bis einschließlich 2027-02-15'].every((x) => t.includes(x)),
|
||||
'Angaben fehlen in: ' + (w.document.querySelector('.notice') || {}).textContent);
|
||||
});
|
||||
await step('Key-Auswahl zeigt nur nutzbare Kontingente (admin nicht das des Dozenten)', async () => {
|
||||
const a = browser(admin, '#/keys').w;
|
||||
await settle(a);
|
||||
const adminOptions = [...a.document.querySelectorAll('#key-kind option')].map((o) => o.textContent);
|
||||
expect(!adminOptions.some((t) => t.includes('ki-praktikum')), 'admin sieht fremdes Kontingent: ' + adminOptions.join(' | '));
|
||||
const st = browser(student, '#/keys').w;
|
||||
await settle(st);
|
||||
const studentOptions = [...st.document.querySelectorAll('#key-kind option')].map((o) => o.textContent);
|
||||
expect(studentOptions.some((t) => t.includes('ki-praktikum') && t.includes('von dozent')), 'student: ' + studentOptions.join(' | '));
|
||||
});
|
||||
await step('admin sucht unter Alle Keys und in den Benutzern', async () => {
|
||||
const { w } = browser(admin, '#/allkeys');
|
||||
await settle(w);
|
||||
|
||||
Reference in new issue
Block a user