Hello guy ! , I’m Newbie Developer .
I have one problem , I want to change role permission from " A " to " B "
(When user click save button on documents)
What code syntax in Python or JavaScript ?
Thank You .
Auba
March 19, 2019, 8:56am
#2
@amornpoj I have problem same.
@kolate_sambhaji help me please , I am newbie
Can you explain in details?
For which doc you want role permission?
Hello @amornpoj ,
You can refer to this source code.
verify_password,
)
from frappe.desk.notifications import extract_mentions
from frappe.frappeclient import FrappeClient
from frappe.model.delete_doc import delete_doc
from frappe.tests.utils import FrappeTestCase
from frappe.utils import get_url
user_module = frappe.core.doctype.user.user
test_records = frappe.get_test_records("User")
class TestUser(FrappeTestCase):
def tearDown(self):
# disable password strength test
frappe.db.set_value("System Settings", "System Settings", "enable_password_policy", 0)
frappe.db.set_value("System Settings", "System Settings", "minimum_password_score", "")
frappe.db.set_value("System Settings", "System Settings", "password_reset_limit", 3)
frappe.set_user("Administrator")
def test_user_type(self):
Regards,
Ivan
@kolate_sambhaji
Now , I’m doing a project that use frappe framework .
I want to separate module doctype for user when I login defferent user.
@iRaySpace Can you example code for change role please.