Hi. I have the following case, I need to enable or disable components of PrimeFaces taking into account the permissions assigned in the Database, most examples are by pages in this case I need to control the components for example:
I have a table permissions in the database associated with a user:
User: Pedro
Display: Users
Component: ButtonSave
Permission: Yes / No
If the user has permission = Yes, disabled="false"
<p:commandButton value="Disabled" id="BotonGuardar" disabled="false" />
If permission = No, disabled="true"
<p:commandButton value="Disabled" id="BotonGuardar" disabled="true" />
The idea is to control this behavior from the Bean for each user. Thanks