Jump to content

Restrict Access to Add On Manager Pilot Groups?


in2tech

Recommended Posts

  • Moderators

Everyone can access simpilot using his email. :P Just kidding...

This can be done very easily via opening the module file. I cannot let you know how to do this on any module developed by simpilot but let me give you an example with the Events_Admin module. Go to you phpvms installation directory->admin->core->Events_admin->Events_admin.php. In this file you will find this:

public function NavBar()
   {
    echo '<li><a href="'.SITE_URL.'/admin/index.php/events_admin">Events</a></li>';
   }

If you want to limit it, you will have to put the echo between this:

if(PilotGroups::group_has_perm(Auth::$usergroups, EDIT_PAGES)) {
//the echo code
}

So, based on this example, you will have something like this:

   	 if(PilotGroups::group_has_perm(Auth::$usergroups, EDIT_PAGES)) {
        echo '<li><a href="'.SITE_URL.'/admin/index.php/Academy">Pilot Academy</a></li>';
       }

If you check this if sentence there is the EDIT_PAGES. This means that only those you have the EDIT_PAGES permission will see this link on the addon's menu. You can change this to whatever you do prefer based on the current phpvms permissions. The same work can be done with all the other modules. I just want to let you know that this part of code will only limit the link on the addon's menu. If a va staff wants to get access to this module, he can do it using the url... (for example, in that case, your websites url/admin/index.php/Events_admin) If you want to limit this access, you have to edit every template file...

On phpvms it is not suggested to edit the current permissions system cause it will might cause problems on your system...

Link to comment
Share on other sites

  • Administrators

You can add more permissions to the native permission set by manipulating the set in app.config.php. (You should move your edited permission set to your local.config.php file) Depending on how you do it you will most likely have to change the value for the "FULL_ADMIN" permission.

The system the permission set is based on and how to use it is shown here http://www.litfuel.n...als/bitwise.htm

Link to comment
Share on other sites

  • 5 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...