mirror of
https://github.com/frappe/lms.git
synced 2026-04-19 22:52:29 +03:00
fix: add type annotations and role validation to create_google_meet_live_class
Add type hints to match create_live_class signature. Add frappe.only_for role check to prevent unauthorized access.
This commit is contained in:
@@ -290,15 +290,17 @@ def create_live_class(
|
||||
|
||||
@frappe.whitelist()
|
||||
def create_google_meet_live_class(
|
||||
batch_name,
|
||||
google_meet_account,
|
||||
title,
|
||||
duration,
|
||||
date,
|
||||
time,
|
||||
timezone,
|
||||
description=None,
|
||||
batch_name: str,
|
||||
google_meet_account: str,
|
||||
title: str,
|
||||
duration: int,
|
||||
date: str,
|
||||
time: str,
|
||||
timezone: str,
|
||||
description: str = None,
|
||||
):
|
||||
frappe.only_for(["Moderator", "Batch Evaluator"])
|
||||
|
||||
google_meet_settings = frappe.get_doc("LMS Google Meet Settings", google_meet_account)
|
||||
if not google_meet_settings.enabled:
|
||||
frappe.throw(_("Please enable the Google Meet account to use this feature."))
|
||||
|
||||
Reference in New Issue
Block a user