Site Plugin
-
@Wayne-Workman said in Site Plugin:
@Fernando-Gietz Ok then - but perhaps a different name then? How about “Site Control” similarly named after “Access Control”.
Yes, is a good idea. I need change somethings in the code … rename all clases XD
-
Well I have finished the beta version, you can test it from the last RC version (1.4.0-RC12).
What does the site plugin do?
The site plugin allows you to restrict/control the access and the searches of hosts to one or more sites. When you associate one user to a site, this user only can see the hosts which are linked/located to this site. This plugin restricts the access to hosts in the task menu too, the user only can see the tasks of his hosts.Brief operation instructions
- Install the plugin
- Go to Site Manager Menu
- Create a New Site
3.1) Enter the site name and his description - Link the hosts to the site. You can do it from the host menu or from group menu
4.1) From host menu: Enter in the host General tab and select the site from “Associate Host to a site” dropbox
4.2) From group menu: with this option you can link multiple hosts to one site. Go to the “Site Association” tab and select the site from the dropbox. - Link users to one site
5.1) Go to Site Manager menu.
5.2) Search or list the Sites. Choose the site.
5.3) Go to membership tab
5.4) Check the checkbox to show the user list
5.5) Select the users which you want to link to the Site
5.6) click the “Add User to Site” button - Restrict the access to the users
6.1) Go to User Menu
6.2) Search the user and select it. In the list you can see the sites that are inked to the user and if is a restrinc user.
6.3) Go to General tab
6.4) If you want to restrict the user, check the “Is restricted user” checkbox
6.5) Click “Update” button
-
I feel I should add, I’ve modified the plugin a little bit to enable the “common” look and feel of other “membership” elements.
Site plugin originally only allowed removing hosts, but had no way to associate hosts “en-mass”. This is now corrected for in dev-branch as well.
-
Hello @Fernando-Gietz.
Nice to see you are still working on FOG. I was using your FOGehu fork during years at my laboratory in the University, and now I started to use original FOG versión 1.5.5 again. Have you any plan to make your site plugin working with this version?
I’m using access-control plugin, and really need the site plugin to control users only see their computers, not the entire building hosts.Thanks again for your work.
-
Hi @ragnurenson ,
Actually I don’t use the site plugin, then I don’t know that it fails. I will try to see what happens with it, and fix the bug -
@Fernando-Gietz your plugin is just the piece that is missing on my infrastructure so I can control access from other departments to FOG interface and storages. If I can provide any help on the issue just let me know, thank you!
-
@ragnurenson , @fenix_team I have fixed the bugs in working branch. Works so fine that now I am using it XD
Site plugin version 1.5.5_1
-
@Fernando-Gietz hello Fernando, I don’t know if I’m doing it right… My FOG version is 1.5.5 straight out of the master branch. I’ve created a Site, included an user in Membership and a list of hosts that user has the right to find in searches. But when I log in with that user credentials, it’s still able to find hosts in and out of the Site associated hosts list!
I have the Access Control and Location plugin installed as well.
-
Host association screen (should find ONLY hosts that starts with “FENG”)
-
Logged in as target limited user, hosts that are not “FENG” are still displaying!
Any help will be largely appreciated, thanks in advance!
-
-
@fenix_team Hi! @Fernando-Gietz had revised the plugin to work with 1.5.5 version, but the changes are only at working_dev branch by now. You can make the changes by yourself.
In the file /var/www/html/fog/lib/plugins/site/pages/sitemanagementpage.class.php, you must replace the line 114
'hosts' => $Site->getHostCount()
, with this code:
'hosts' => self::getClass('SiteHostAssociationManager') ->count( ['siteID' => $Site->id] )
Hope this can help you.
-
@ragnurenson Hello! Thank you for sharing this! I’ve updated the file as suggested, but unfortunately it didn’t change anything, I’m still capable of finding unwanted hosts while logged in with my limited account.
I believe the bug @Fernando-Gietz fixed was just concerning the host count that shows on Site Management page when you list All Sites. That feature was fixed after updating the file, indeed! But the listing problems are still lingering, at least for me…
I did a test putting a single host in this Site, then I’ve searched the partial name and it shows up with all the other ones, as the plugin has no effect.
This is my limited user account configs. As you can see, it’s correctly enrolled with the created Site called “SMT”.
[EDIT] - I found the commit concerning the right updates! I will test them and report later, thanks everyone!
-
@ragnurenson so, I’ve just tested after applying the commited changes and everything works fine! Thank you for pointing out the github commit and thanks @Fernando-Gietz for the awesome work!
If I can make a suggestion, I’d say it would be nice to have that search filter implemented in “List All Hosts” screen on Active Tasks!