Closed shariquerik closed 3 months ago
Added has_permission to check if user has access to portal page
has_permission
add_to_apps_screen = [ { "name": "gameplan", "logo": "/assets/gameplan/manifest/favicon-196.png", "title": "Gameplan", "route": "/g", "has_permission": "gameplan.api.check_app_permission" } ]
def check_app_permission(): if frappe.session.user == "Administrator": return True roles = frappe.get_roles() if any(role in ["System Manager", "Gameplan Admin", "Gameplan Member", "Gameplan Guest"] for role in roles): return True return False
Added
has_permission
to check if user has access to portal page