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