Scan subnet for now hosts Permission problem
phpipam open-source IP address management
Brought to you by:
myha
Hello,
We are facing out a problem with the permission on the subnets after the upgrade
All users in order to be able to use the button "Scan subnet for now hosts" have to be Admin in PhPipam.
Even if a user is in a group that on a section is set with rwa permission, and the user is set with the rwa permissions on the folder and the nested subnet this function is not working and at the user it will be displayed the follow message
Error
Administrative privileges required
For these users it is possible to modify/delete all the subnet, to add/delete hosts
PhpIpam 1.2.1
Thanks,
Francesco
Anonymous
Hello,
In order to resolve the problem I edited the files
/var/www/phpipam/app/subnets/scan/subnet-scan.php
/var/www/phpipam/app/subnets/scan/subnet-scan-execute.php
In both of the file I add false to call of the $Admin class
Changing
$Admin = new Admin ($Database); to
$Admin = new Admin ($Database, false);
As far as I undertand if the false is not specified the constructor of the class will check if the user is an "Administrator" using the "private $admin_required = true;" directive of the class.Admin.php
Is it correct to add a false or I'm introducing some different error on the code with this?
Thanks
Francesco