Refactor Admin Rights Management and Update Versioning
Deploy Development / deploy (push) Successful in 44s
Test Suite / pytest-backend (push) Failing after 1s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 13s
Test Suite / k6 /health Baseline (push) Successful in 34s
Test Suite / playwright-tests (push) Has been cancelled
Deploy Development / deploy (push) Successful in 44s
Test Suite / pytest-backend (push) Failing after 1s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 13s
Test Suite / k6 /health Baseline (push) Successful in 34s
Test Suite / playwright-tests (push) Has been cancelled
- Replaced the admin club feature exemptions router with a new admin rights router to streamline capability management. - Added new API endpoints for managing admin rights, including capability grants and quota bypass for portal roles and profiles. - Updated the frontend to include navigation and lazy loading for the new Admin Rights page. - Incremented application version to 0.8.197 to reflect these changes and enhancements.
This commit is contained in:
1 parent
8404a42b6c
commit
e4cb491d46
9 files changed
+1422
-231
No files matched your search
@@ -261,6 +261,87 @@ export async function rejectClubCreationRequest(requestId) {
|
||||
return request(`/api/admin/club-creation-requests/${requestId}/reject`, { method: 'POST' })
|
||||
}
|
||||
|
||||
/** M6: Rollen & Rechte — Capabilities, Kontingent-Bypass, Vereins-Kontingente (Superadmin). */
|
||||
export async function getAdminRightsCapabilityMatrix() {
|
||||
return request('/api/admin/rights/capability-matrix')
|
||||
}
|
||||
|
||||
export async function addAdminRightsPortalGrant(portalRole, capabilityId) {
|
||||
return request('/api/admin/rights/capability-grants/portal-roles', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({ portal_role: portalRole, capability_id: capabilityId }),
|
||||
})
|
||||
}
|
||||
|
||||
export async function deleteAdminRightsPortalGrant(portalRole, capabilityId) {
|
||||
const q = new URLSearchParams({ portal_role: portalRole, capability_id: capabilityId })
|
||||
return request(`/api/admin/rights/capability-grants/portal-roles?${q}`, { method: 'DELETE' })
|
||||
}
|
||||
|
||||
export async function addAdminRightsClubRoleGrant(roleCode, capabilityId) {
|
||||
return request('/api/admin/rights/capability-grants/club-roles', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({ role_code: roleCode, capability_id: capabilityId }),
|
||||
})
|
||||
}
|
||||
|
||||
export async function deleteAdminRightsClubRoleGrant(roleCode, capabilityId) {
|
||||
const q = new URLSearchParams({ role_code: roleCode, capability_id: capabilityId })
|
||||
return request(`/api/admin/rights/capability-grants/club-roles?${q}`, { method: 'DELETE' })
|
||||
}
|
||||
|
||||
export async function listAdminRightsQuotaBypass() {
|
||||
return request('/api/admin/rights/quota-bypass')
|
||||
}
|
||||
|
||||
export async function addAdminRightsQuotaBypassPortal(portalRole, featureId = null) {
|
||||
return request('/api/admin/rights/quota-bypass/portal-roles', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({ portal_role: portalRole, feature_id: featureId }),
|
||||
})
|
||||
}
|
||||
|
||||
export async function deleteAdminRightsQuotaBypassPortal(portalRole, featureId = null) {
|
||||
const q = new URLSearchParams({ portal_role: portalRole })
|
||||
if (featureId) q.set('feature_id', featureId)
|
||||
return request(`/api/admin/rights/quota-bypass/portal-roles?${q}`, { method: 'DELETE' })
|
||||
}
|
||||
|
||||
export async function addAdminRightsQuotaBypassProfile(profileId, featureId = null, reason = null) {
|
||||
return request(`/api/admin/rights/quota-bypass/profiles/${profileId}`, {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({ feature_id: featureId, reason }),
|
||||
})
|
||||
}
|
||||
|
||||
export async function deleteAdminRightsQuotaBypassProfile(profileId, featureId = null) {
|
||||
const q = new URLSearchParams({ profile_id: String(profileId) })
|
||||
if (featureId) q.set('feature_id', featureId)
|
||||
return request(`/api/admin/rights/quota-bypass/profiles?${q}`, { method: 'DELETE' })
|
||||
}
|
||||
|
||||
export async function getAdminRightsClubPlansMatrix() {
|
||||
return request('/api/admin/rights/club-plans/matrix')
|
||||
}
|
||||
|
||||
export async function updateAdminRightsClubPlanLimits(planId, limits) {
|
||||
return request(`/api/admin/rights/club-plans/${encodeURIComponent(planId)}/limits`, {
|
||||
method: 'PUT',
|
||||
body: JSON.stringify({ limits }),
|
||||
})
|
||||
}
|
||||
|
||||
export async function listAdminRightsClubSubscriptions() {
|
||||
return request('/api/admin/rights/club-subscriptions')
|
||||
}
|
||||
|
||||
export async function updateAdminRightsClubSubscription(clubId, payload) {
|
||||
return request(`/api/admin/rights/clubs/${clubId}/subscription`, {
|
||||
method: 'PUT',
|
||||
body: JSON.stringify(payload),
|
||||
})
|
||||
}
|
||||
|
||||
/** Offene Anträge (Vereins-/Plattform-Admin). */
|
||||
export async function listClubJoinRequests(clubId) {
|
||||
return request(`/api/clubs/${clubId}/join-requests`)
|
||||
@@ -924,6 +1005,20 @@ export const api = {
|
||||
listAdminClubCreationRequests,
|
||||
approveClubCreationRequest,
|
||||
rejectClubCreationRequest,
|
||||
getAdminRightsCapabilityMatrix,
|
||||
addAdminRightsPortalGrant,
|
||||
deleteAdminRightsPortalGrant,
|
||||
addAdminRightsClubRoleGrant,
|
||||
deleteAdminRightsClubRoleGrant,
|
||||
listAdminRightsQuotaBypass,
|
||||
addAdminRightsQuotaBypassPortal,
|
||||
deleteAdminRightsQuotaBypassPortal,
|
||||
addAdminRightsQuotaBypassProfile,
|
||||
deleteAdminRightsQuotaBypassProfile,
|
||||
getAdminRightsClubPlansMatrix,
|
||||
updateAdminRightsClubPlanLimits,
|
||||
listAdminRightsClubSubscriptions,
|
||||
updateAdminRightsClubSubscription,
|
||||
listClubJoinRequests,
|
||||
acceptClubJoinRequest,
|
||||
rejectClubJoinRequest,
|
||||
|
||||
Reference in new issue
Block a user