Access Control List (ACL)

An access control list (ACL) contains rules that grant or deny access to certain digital environments. A list of permissions associated with an object. The list specifies who or what is allowed to access the object and what operations are allowed to be performed on the object.


# ACL in Controller

VaahCms provide a method in Controller to check the User's access. You can call this method before execute an action.

copy

# ACL in View

You can call the Controller method inside view file

copy

# ACL in Vue

In Vue, you can not call the Controller method directly. So for ACL, you will need to get the list of Permissions from Controller.

There is a function in root.js at VaahCms/..../Vue/store/modules/ of name getPermissions. If you don't found any function like this, then you can create in root.js.

root.js
copy

Now, you can call this function in Vue Route Middleware or in Vue Component

Vue Route Middleware

GetBackendAssets.js file located at VaahCms/..../Vue/routes/middleware/

GetBackendAssets.js
copy
routes.js
copy
Vue Component
copy

In Controller, you have to write this code to get permissions list.

copy

In Vue, there is a VaahHelper function that is used to check User access.

copy

To know about VaahHelper.

Read Documentation