Portal, logo, workspace shortcut

This commit is contained in:
KabundiNjuki
2026-10-05 16:04:29 +03:00
parent eafa1242db
commit 72046591a3
95 changed files with 5480 additions and 793 deletions
+17
View File
@@ -0,0 +1,17 @@
import frappe
from frappe.sessions import get_csrf_token
from frappe.utils import get_fullname
no_cache = 1
def get_context(context):
if frappe.session.user == "Guest":
frappe.local.flags.redirect_location = "/login?redirect-to=/makap-portal"
raise frappe.Redirect
if frappe.db.get_value("User", frappe.session.user, "user_type") != "System User":
raise frappe.PermissionError("The MAKAP portal is for internal users only.")
context.no_cache = 1
context.csrf_token = get_csrf_token()
context.user = frappe.session.user
context.full_name = get_fullname(frappe.session.user)