how to do authorization and role based permissions in webix

how create UI manipulation (Showing or hiding / enabled or disabled part/widgets of the screens based on the user permission) ?

example:
{
"view": "form",
"elements": [
{
"view": "text",
"name": "testi",
"label": "testi",
"labelWidth": "100",
onAuthorizedPermission:"enable"
onUnauthorizedPermission:"disable"
},
{
"view": "button",
"name": "submit",
"label": "submit",
"labelWidth": "100",
"disabled": function getAutorized()
}
]
}

Comments

  • authorization is not related to webix.
    but you can do something like this:

    {
       view:"text", disabled: !isUserAuthorized()
    }
    
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion