fix: don't update onboarding status if user is not system manager
This commit is contained in:
@@ -14,6 +14,7 @@ import dayjs from '@/utils/dayjs'
|
||||
import Embed from '@editorjs/embed'
|
||||
import SimpleImage from '@editorjs/simple-image'
|
||||
import Table from '@editorjs/table'
|
||||
import { usersStore } from '../stores/user'
|
||||
|
||||
export function createToast(options) {
|
||||
toast({
|
||||
@@ -567,3 +568,8 @@ export const escapeHTML = (text) => {
|
||||
(char) => escape_html_mapping[char] || char
|
||||
)
|
||||
}
|
||||
|
||||
export const canCreateCourse = () => {
|
||||
const { userResource } = usersStore()
|
||||
return userResource.data?.is_instructor || userResource.data?.is_moderator
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user