in2tech Posted May 13, 2014 Report Posted May 13, 2014 When setting up pilot group to give them certain access to the admin area, how do I restrict access to the SimPilot and all Add On module(s)? There is not an option in the Group Permissions area when editing the groups! Thanks! Quote
Moderators servetas Posted May 14, 2014 Moderators Report Posted May 14, 2014 Everyone can access simpilot using his email. 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... Quote
in2tech Posted May 14, 2014 Author Report Posted May 14, 2014 Thanks for the info. I thought maybe there was a way to add a checkbox in pilot permissions for restricting access to the entire Addon's area! If it's going to break the system it's not worth it. Was basically just wondering anyway. Quote
Moderators servetas Posted May 14, 2014 Moderators Report Posted May 14, 2014 No, it is not possible, you can just restrict their access using a permission which already exists... Quote
Administrators simpilot Posted May 15, 2014 Administrators Report Posted May 15, 2014 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 Quote
Gofast77 Posted October 17, 2014 Report Posted October 17, 2014 Hi, Can I've an other link because this : http://www.litfuel.n...als/bitwise.htm is dead... Thanks Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.