fix: sidebar settings issue if guest access was not allowed
This commit is contained in:
@@ -84,16 +84,10 @@
|
||||
</Dialog>
|
||||
</template>
|
||||
<script setup>
|
||||
import {
|
||||
Dialog,
|
||||
createResource,
|
||||
Tooltip,
|
||||
FormControl,
|
||||
Autocomplete,
|
||||
toast,
|
||||
} from 'frappe-ui'
|
||||
import { Dialog, createResource, Tooltip, FormControl, toast } from 'frappe-ui'
|
||||
import { reactive, inject, onMounted } from 'vue'
|
||||
import { getTimezones, getUserTimezone } from '@/utils/'
|
||||
import Autocomplete from '@/components/Controls/Autocomplete.vue'
|
||||
|
||||
const liveClasses = defineModel('reloadLiveClasses')
|
||||
const show = defineModel()
|
||||
|
||||
@@ -395,7 +395,7 @@ def get_all_users():
|
||||
@frappe.whitelist(allow_guest=True)
|
||||
def get_sidebar_settings():
|
||||
lms_settings = frappe.get_single("LMS Settings")
|
||||
if not lms_settings.allow_guest_access:
|
||||
if frappe.session.user == "Guest" and not lms_settings.allow_guest_access:
|
||||
return []
|
||||
|
||||
sidebar_items = frappe._dict()
|
||||
|
||||
Reference in New Issue
Block a user