Add Admin User Content Management Features
Deploy Development / deploy (push) Successful in 42s
Test Suite / pytest-backend (push) Successful in 44s
Test Suite / lint-backend (push) Successful in 1s
Test Suite / build-frontend (push) Successful in 15s
Test Suite / k6 /health Baseline (push) Successful in 35s
Test Suite / playwright-tests (push) Successful in 1m18s
Test Suite / pytest-backend (pull_request) Successful in 38s
Test Suite / lint-backend (pull_request) Successful in 0s
Test Suite / build-frontend (pull_request) Successful in 13s
Test Suite / k6 /health Baseline (pull_request) Successful in 38s
Test Suite / playwright-tests (pull_request) Successful in 1m12s
Deploy Development / deploy (push) Successful in 42s
Test Suite / pytest-backend (push) Successful in 44s
Test Suite / lint-backend (push) Successful in 1s
Test Suite / build-frontend (push) Successful in 15s
Test Suite / k6 /health Baseline (push) Successful in 35s
Test Suite / playwright-tests (push) Successful in 1m18s
Test Suite / pytest-backend (pull_request) Successful in 38s
Test Suite / lint-backend (pull_request) Successful in 0s
Test Suite / build-frontend (pull_request) Successful in 13s
Test Suite / k6 /health Baseline (pull_request) Successful in 38s
Test Suite / playwright-tests (pull_request) Successful in 1m12s
- Introduced a new admin user content management endpoint for superadmins, allowing for moderation of user-generated content. - Updated the backend to include new API functions for retrieving, patching, and deleting user content items. - Enhanced the frontend with a new Admin User Content page and navigation link for easy access to user content management. - Updated access layer documentation to reflect the new endpoint and its exempt status. - Incremented version to 0.8.191 and updated changelog to document these additions in admin functionality.
This commit is contained in:
1 parent
3450a9296a
commit
bd5a409fa7
8 files changed
+1254
-3
No files matched your search
@@ -50,6 +50,39 @@ export async function listAdminUsers() {
|
||||
return request('/api/admin/users')
|
||||
}
|
||||
|
||||
/** Superadmin: Metadaten zu nutzerangelegten Inhaltstypen. */
|
||||
export async function getAdminUserContentMeta() {
|
||||
return request('/api/admin/user-content/meta')
|
||||
}
|
||||
|
||||
/** Superadmin: Aktivitätsübersicht je Nutzer (Anzahl Inhalte). */
|
||||
export async function listAdminUserContentSummary() {
|
||||
return request('/api/admin/user-content/users-summary')
|
||||
}
|
||||
|
||||
/** Superadmin: Inhalte aller Nutzer (inkl. privat) — filterbar. */
|
||||
export async function listAdminUserContentItems(params = {}) {
|
||||
const qs = new URLSearchParams()
|
||||
for (const [k, v] of Object.entries(params)) {
|
||||
if (v !== undefined && v !== null && v !== '') qs.set(k, String(v))
|
||||
}
|
||||
const q = qs.toString()
|
||||
return request(`/api/admin/user-content/items${q ? `?${q}` : ''}`)
|
||||
}
|
||||
|
||||
/** Superadmin: Status/Sichtbarkeit eines Inhalts setzen. */
|
||||
export async function patchAdminUserContentItem(contentType, itemId, body) {
|
||||
return request(`/api/admin/user-content/items/${contentType}/${itemId}`, {
|
||||
method: 'PATCH',
|
||||
body: JSON.stringify(body),
|
||||
})
|
||||
}
|
||||
|
||||
/** Superadmin: Inhalt löschen. */
|
||||
export async function deleteAdminUserContentItem(contentType, itemId) {
|
||||
return request(`/api/admin/user-content/items/${contentType}/${itemId}`, { method: 'DELETE' })
|
||||
}
|
||||
|
||||
/** Medien-Speicher (MEDIA_ROOT + relativer Unterordner) — GET: admin/superadmin, PUT: nur superadmin. */
|
||||
export async function getPlatformMediaStorage() {
|
||||
return request('/api/admin/platform-media-storage')
|
||||
@@ -819,6 +852,11 @@ export const api = {
|
||||
getCurrentProfile,
|
||||
listProfiles,
|
||||
listAdminUsers,
|
||||
getAdminUserContentMeta,
|
||||
listAdminUserContentSummary,
|
||||
listAdminUserContentItems,
|
||||
patchAdminUserContentItem,
|
||||
deleteAdminUserContentItem,
|
||||
updateProfile,
|
||||
managementPasswordReset,
|
||||
changePassword,
|
||||
|
||||
Reference in new issue
Block a user