How to change role permission

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 .

@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.


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.

Please check following link