🔒 A Vue.js & Nuxt.js plugin that allows you to use roles and permissions in your components or DOM elements, also compatible as middleware and methods.
When changing the permissions in a running application (e.g. by calling a backend for updated permission) and updating them through setPermissions, many components rendering child components get removed from outward to inward. This leads to an error, where children try to remove themselve from a non existing parent.
This happens with multiple bootstrap components.
Attached you can find the errors and a code example.
Errors
Code
Temporary Fix:
You can fix this by using a v-show instead of the provided v-permission, which does not remove the element from the DOM but just hides it. As this can come with unwanted security implications its not an ideal fix.
When changing the permissions in a running application (e.g. by calling a backend for updated permission) and updating them through setPermissions, many components rendering child components get removed from outward to inward. This leads to an error, where children try to remove themselve from a non existing parent. This happens with multiple bootstrap components. Attached you can find the errors and a code example.
Errors
Code
Temporary Fix: You can fix this by using a v-show instead of the provided v-permission, which does not remove the element from the DOM but just hides it. As this can come with unwanted security implications its not an ideal fix.
Do you have any suggestion, how to fix this?