Access Based levels Logic in DMN

Hi All,
I am trying to implement is for a user we have assigned roles. So based on the role I need to give access for screens and fields in the screen. But the Role is to be given as Output in the boolean type and screens and fields should be given as input. So is there a way to do this like in javascript or I can directly give in Input itself. Please suggest your ideas for this.

Thanks
Kishan

@Kishan_R providing screens & field access based on logged in user role can be achieved through DMN also, as well as programmatically.

If you have more screens and no of users are more, then its better to use DMN. Otherwise you will end up with many if…else if…else conditions.

Also in later on time, if you want to change the permission for accessing any screens for user, code change is involved if the logic is implemented programmatically also you have to redeploy the application again.

If you accomodate those conditions in DMN, only DMN deployment is sufficient and no application downtime.

I understand it is there any example likewise for this.