How To Restrict A Usergroup To Access Some Areas Of My Addon?

I have an addon that includes some info about accounting of my web site. I want a usergroup to give the abbility to access some areas/a part of my addon but not to areas that I don't want. How to restrict a usergroup to access some areas of my addon?

I have learned how to do this by looking this post -> http://forum.cs-cart.com/topic/42692-add-permissions-for-an-addon-without-permissions/

But I don't understand what is this code in admin.post.php (Example in banners addon)

$schema['tools']['modes']['update_status']['param_permissions']['table']['banners'] = 'manage_banners';

I have learned how to do this by looking this post -> http://forum.cs-cart.com/topic/42692-add-permissions-for-an-addon-without-permissions/

But I don't understand what is this code in admin.post.php (Example in banners addon)

$schema['tools']['modes']['update_status']['param_permissions']['table']['banners'] = 'manage_banners';

It means that when the app/controllers/backend/tools.php controller is called with the update_status mode for the cscart_banners table, the system should check manage_banners privilidge of the administrator account

Thanks eComLabs. I got it.

New question: I want this user group not to see some part of text in TPL file. So, the user that has restricted permision should access to my addon but not see some text that I selected.

New question: I want this user group not to see some part of text in TPL file. So, the user that has restricted permision should access to my addon but not see some text that I selected.

User groups of the customer can be found in the following array:

{$auth.usergroup_ids|fn_print_r}

Please check its content and add necessary conditions to the tpl file

Thanks ecom. BTW, I think I can use fn_check_user_access function in TPL file. But I am not sure how to use it. Is there an example?

Thanks ecom. BTW, I think I can use fn_check_user_access function in TPL file. But I am not sure how to use it. Is there an example?

This function should have two input parameters

- User ID

- Privilege name which can be enabled/ disabled for the user group (e.g. view_orders, manage_orders, etc)

I got it. I found the way to use:

{assign var="permission" value=$auth.user_id|fn_check_user_access:"my_addon_view"}

Thanks.