Opencart Add File Permission: We can define access file permission code for current user into our module. When we install Opencart module into our store each time we have to allow the user permission for the module files. Like mentioned into below screenshot:

So we no need to go for the following procedure, you can also allow the file access or modify permission for user through addPermission() method. Like mentioned into below screenshot:

You have to write the code for permission in install function. Firstly load the user_group model and then call the addPermission() method with three arguments: currently login user_id, access_level, controller_name.

Be the first to comment.