Änderung: Anpassung der Berechtigungsverwaltung in ForumService und ForumAdminView

Änderungen:
- Im ForumService wurde die Berechtigungsabfrage aktualisiert, um direkt den Wert der Berechtigung zu verwenden.
- In ForumAdminView wurde die Verarbeitung der Berechtigungen beim Erstellen eines neuen Forums angepasst, um die Werte der Berechtigungen korrekt zu übermitteln.

Diese Anpassungen verbessern die Konsistenz und Funktionalität der Berechtigungsverwaltung im Forum.
This commit is contained in:
Torsten Schulz (local)
2025-09-15 08:53:23 +02:00
parent d475e8b2f7
commit 3e70bbee9b
2 changed files with 2 additions and 2 deletions

View File

@@ -24,7 +24,7 @@ class ForumService extends BaseService {
if (permissions && permissions.length > 0) { if (permissions && permissions.length > 0) {
for (const permission of permissions) { for (const permission of permissions) {
const forumPermission = await ForumPermission.findOne({ const forumPermission = await ForumPermission.findOne({
where: { name: permission.value } where: { name: permission }
}); });
if (forumPermission) { if (forumPermission) {
await newForum.addAssociatedPermissions(forumPermission); await newForum.addAssociatedPermissions(forumPermission);

View File

@@ -86,7 +86,7 @@ export default {
try { try {
await apiClient.post('/api/forum', { await apiClient.post('/api/forum', {
name: this.newForum.name, name: this.newForum.name,
permissions: this.newForum.permissions, permissions: this.newForum.permissions.map(p => p.value),
}); });
this.newForum.name = ''; this.newForum.name = '';
this.newForum.permissions = []; this.newForum.permissions = [];