RBA
RBA Concept
RBA is built-in feature in harmony that give you the option to store in redux store the permissions list to the store after login.
RBA Actions
RBA is a base feature that not import automatic to harmony project.
RBAStatus- enum of the all the possible status of each permissionhiddendisabledvisible
policies- async call to the RBA api and store it in rba slice in store. basically you call it once user login.setPermissions- set the rba permissions. basically you call it when user perform logout to clear or set by any other value.
What is the structure of the permissions object after the mapping process?
{
"rba": {
"permissions": {
"shipment": "hidden",
"searchInput": "disabled",
"addToCart": "disabled"
}
}
}
RBAC Component
To use the RBAC component that will wrap your ui component you need to do the following:
In your render you will need to use it as following: