fix: restrict profile and mark as complete
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"actions": [],
|
||||
"allow_rename": 1,
|
||||
"autoname": "hash",
|
||||
"creation": "2021-12-07 12:20:37.143096",
|
||||
"doctype": "DocType",
|
||||
"editable_grid": 1,
|
||||
@@ -61,10 +62,11 @@
|
||||
"index_web_pages_for_search": 1,
|
||||
"istable": 1,
|
||||
"links": [],
|
||||
"modified": "2021-12-14 11:42:24.844113",
|
||||
"modified": "2021-12-21 10:05:43.377876",
|
||||
"modified_by": "Administrator",
|
||||
"module": "LMS",
|
||||
"name": "Certification",
|
||||
"naming_rule": "Random",
|
||||
"owner": "Administrator",
|
||||
"permissions": [],
|
||||
"sort_field": "modified",
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"actions": [],
|
||||
"allow_rename": 1,
|
||||
"autoname": "hash",
|
||||
"creation": "2021-12-07 12:15:46.078717",
|
||||
"doctype": "DocType",
|
||||
"editable_grid": 1,
|
||||
@@ -74,10 +75,11 @@
|
||||
"index_web_pages_for_search": 1,
|
||||
"istable": 1,
|
||||
"links": [],
|
||||
"modified": "2021-12-10 12:12:58.827429",
|
||||
"modified": "2021-12-21 09:58:42.343823",
|
||||
"modified_by": "Administrator",
|
||||
"module": "LMS",
|
||||
"name": "Education Detail",
|
||||
"naming_rule": "Random",
|
||||
"owner": "Administrator",
|
||||
"permissions": [],
|
||||
"sort_field": "modified",
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
],
|
||||
"index_web_pages_for_search": 1,
|
||||
"links": [],
|
||||
"modified": "2021-12-14 14:02:46.474260",
|
||||
"modified": "2021-12-21 09:34:35.018280",
|
||||
"modified_by": "Administrator",
|
||||
"module": "LMS",
|
||||
"name": "Function",
|
||||
@@ -37,6 +37,16 @@
|
||||
"role": "System Manager",
|
||||
"share": 1,
|
||||
"write": 1
|
||||
},
|
||||
{
|
||||
"email": 1,
|
||||
"export": 1,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"role": "All",
|
||||
"select": 1,
|
||||
"share": 1
|
||||
}
|
||||
],
|
||||
"sort_field": "modified",
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
],
|
||||
"index_web_pages_for_search": 1,
|
||||
"links": [],
|
||||
"modified": "2021-12-14 14:38:10.405473",
|
||||
"modified": "2021-12-21 09:35:20.443192",
|
||||
"modified_by": "Administrator",
|
||||
"module": "LMS",
|
||||
"name": "Industry",
|
||||
@@ -37,6 +37,16 @@
|
||||
"role": "System Manager",
|
||||
"share": 1,
|
||||
"write": 1
|
||||
},
|
||||
{
|
||||
"email": 1,
|
||||
"export": 1,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"role": "All",
|
||||
"select": 1,
|
||||
"share": 1
|
||||
}
|
||||
],
|
||||
"sort_field": "modified",
|
||||
|
||||
@@ -14,7 +14,7 @@ def check_profile_restriction():
|
||||
force_profile_completion = frappe.db.get_single_value("LMS Settings", "force_profile_completion")
|
||||
user = frappe.db.get_value("User", frappe.session.user, ["profile_complete", "username"], as_dict=True)
|
||||
return {
|
||||
"redirect": force_profile_completion and not user.profile_complete,
|
||||
"restrict": force_profile_completion and not user.profile_complete,
|
||||
"username": user.username,
|
||||
"prefix": frappe.get_hooks("profile_url_prefix") or "/users/"
|
||||
"prefix": frappe.get_hooks("profile_url_prefix")[0] or "/users/"
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"actions": [],
|
||||
"allow_rename": 1,
|
||||
"autoname": "hash",
|
||||
"creation": "2021-12-14 14:42:48.823215",
|
||||
"doctype": "DocType",
|
||||
"editable_grid": 1,
|
||||
@@ -12,19 +13,20 @@
|
||||
{
|
||||
"fieldname": "function",
|
||||
"fieldtype": "Link",
|
||||
"ignore_user_permissions": 1,
|
||||
"in_list_view": 1,
|
||||
"label": "Function",
|
||||
"options": "Function",
|
||||
"reqd": 1
|
||||
"options": "Function"
|
||||
}
|
||||
],
|
||||
"index_web_pages_for_search": 1,
|
||||
"istable": 1,
|
||||
"links": [],
|
||||
"modified": "2021-12-14 14:42:48.823215",
|
||||
"modified": "2021-12-21 10:07:01.448239",
|
||||
"modified_by": "Administrator",
|
||||
"module": "LMS",
|
||||
"name": "Preferred Function",
|
||||
"naming_rule": "Random",
|
||||
"owner": "Administrator",
|
||||
"permissions": [],
|
||||
"sort_field": "modified",
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"actions": [],
|
||||
"allow_rename": 1,
|
||||
"autoname": "hash",
|
||||
"creation": "2021-12-14 14:44:06.808797",
|
||||
"doctype": "DocType",
|
||||
"editable_grid": 1,
|
||||
@@ -21,10 +22,11 @@
|
||||
"index_web_pages_for_search": 1,
|
||||
"istable": 1,
|
||||
"links": [],
|
||||
"modified": "2021-12-14 14:44:21.215262",
|
||||
"modified": "2021-12-21 10:07:14.537564",
|
||||
"modified_by": "Administrator",
|
||||
"module": "LMS",
|
||||
"name": "Preferred Industry",
|
||||
"naming_rule": "Random",
|
||||
"owner": "Administrator",
|
||||
"permissions": [],
|
||||
"sort_field": "modified",
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
],
|
||||
"index_web_pages_for_search": 1,
|
||||
"links": [],
|
||||
"modified": "2021-12-12 10:02:39.584832",
|
||||
"modified": "2021-12-21 09:35:44.265910",
|
||||
"modified_by": "Administrator",
|
||||
"module": "LMS",
|
||||
"name": "Skill",
|
||||
@@ -37,6 +37,16 @@
|
||||
"role": "System Manager",
|
||||
"share": 1,
|
||||
"write": 1
|
||||
},
|
||||
{
|
||||
"email": 1,
|
||||
"export": 1,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"role": "All",
|
||||
"select": 1,
|
||||
"share": 1
|
||||
}
|
||||
],
|
||||
"sort_field": "modified",
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"actions": [],
|
||||
"allow_rename": 1,
|
||||
"autoname": "hash",
|
||||
"creation": "2021-12-07 12:22:44.139341",
|
||||
"doctype": "DocType",
|
||||
"editable_grid": 1,
|
||||
@@ -21,10 +22,11 @@
|
||||
"index_web_pages_for_search": 1,
|
||||
"istable": 1,
|
||||
"links": [],
|
||||
"modified": "2021-12-13 14:42:43.962186",
|
||||
"modified": "2021-12-21 09:59:31.631132",
|
||||
"modified_by": "Administrator",
|
||||
"module": "LMS",
|
||||
"name": "Skills",
|
||||
"naming_rule": "Random",
|
||||
"owner": "Administrator",
|
||||
"permissions": [],
|
||||
"sort_field": "modified",
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"actions": [],
|
||||
"allow_rename": 1,
|
||||
"autoname": "hash",
|
||||
"creation": "2021-12-07 12:17:49.571045",
|
||||
"doctype": "DocType",
|
||||
"editable_grid": 1,
|
||||
@@ -70,10 +71,11 @@
|
||||
"index_web_pages_for_search": 1,
|
||||
"istable": 1,
|
||||
"links": [],
|
||||
"modified": "2021-12-09 16:25:48.104205",
|
||||
"modified": "2021-12-21 09:58:56.254035",
|
||||
"modified_by": "Administrator",
|
||||
"module": "LMS",
|
||||
"name": "Work Experience",
|
||||
"naming_rule": "Random",
|
||||
"owner": "Administrator",
|
||||
"permissions": [],
|
||||
"sort_field": "modified",
|
||||
|
||||
Reference in New Issue
Block a user