mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: implement comprehensive RBAC checks for courses, chapters, collections, and activities, enhancing user rights management and security documentation
This commit is contained in:
parent
887046203e
commit
3ce019abec
22 changed files with 1788 additions and 598 deletions
|
|
@ -161,11 +161,20 @@ export async function bulkAddContributors(course_uuid: string, data: any, access
|
|||
return res
|
||||
}
|
||||
|
||||
export async function bulkRemoveContributors(course_uuid: string, data: any, access_token:string | null | undefined) {
|
||||
export async function bulkRemoveContributors(course_uuid: string, data: any, access_token: string | null | undefined) {
|
||||
const result: any = await fetch(
|
||||
`${getAPIUrl()}courses/${course_uuid}/bulk-remove-contributors`,
|
||||
RequestBodyWithAuthHeader('PUT', data, null,access_token || undefined)
|
||||
RequestBodyWithAuthHeader('PUT', data, null, access_token || undefined)
|
||||
)
|
||||
const res = await getResponseMetadata(result)
|
||||
const res = await errorHandling(result)
|
||||
return res
|
||||
}
|
||||
|
||||
export async function getCourseRights(course_uuid: string, access_token: string | null | undefined) {
|
||||
const result: any = await fetch(
|
||||
`${getAPIUrl()}courses/${course_uuid}/rights`,
|
||||
RequestBodyWithAuthHeader('GET', null, null, access_token || undefined)
|
||||
)
|
||||
const res = await errorHandling(result)
|
||||
return res
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue