Check permissions in vue


! Always check permissions in the backand. These directives enable shorter syntax on vue.

can directive

Custom Vue directive "can" to check against permissions. If permission is not given element gets style display:none

Example:

<element v-can="'curriculum_edit'"><element>

hide-if-permission directive

Custom Vue directive "hide-if-permission" to check against permissions. If permission is given element gets style display:none

Example:

<element v-hide-if-permission="'curriculum_edit'"><element>

permission directive

Custom Vue directive "permission" to check against permissions. If permission is not given element gets removed from DOM.

Example:

<element v-permission="'curriculum_edit'"><element>