How can a user check whether he has permission for a service (in a Mashup)
Hello IoT Community!
I would like to build my mashups in a way, that some buttons (or other widgets) are Enabled/Disabled depending on whether the user has the permission for the underlying service (e.g the service executed when clicking that button).
For that I thought I could write an expression that checks whether the current user has permission for a specific service. Do you have any Ideas how to write a simple expression for that?
As far as I know, an error is thrown when a user tries to execute a service he has no permission for. So maybe I could somehow "catch" the error in the expression?
Maybe something like
try(functionToExecute())
{
return true;
} catch(error){
return false;
}
Unfortunately I have no idea how to implement this behavior...
Any advices are appreciated very much!
Best Regards,
Dominik

