phpipam / phpipam

phpipam development repository
https://phpipam.net
2.24k stars 737 forks source link

Normal user role cannot edit host mac addresses #1614

Open Dallustallus opened 6 years ago

Dallustallus commented 6 years ago

Hi,

Sorry to be a bother, I have set up a normal user role and within the groups I have tested both rw and rwa for this user to edit the mac address of a host. This doesn't work unless I change the user to Administrator.

Am I doing something wrong or is it a bug or is it a feature only for admins? If its only for admins, can we have a feature to allow / disallow for normal user role?

Many Thanks

BenVia74 commented 5 years ago

I have the same problem. I'm using PHP Ipam 1.3.2 on MYSQL 5.6

Normal user role can't edit the MAC address field which is disabled. User need to be administrator to edit Mac address.

it seeams to be a front end issue. Below it's the input of the mac address

<td>
 <div class="form-group "> <input type="text" name="mac" class="ip_addr form-control input-sm" placeholder="MAC address" value="00:00:XX:XX:XX:XX" size="30" disabled="disabled" data-cip-id="jQuery342845642"> 
<input type="hidden" name="mac" value="00:00:XX:XX:XX:XX">
 </div
</td>

When I remove <input type="hidden" name="mac" value="00:00:XX:XX:XX:XX"> and disabled="disabled" and send the form, Mac address is update server side.

To resume, the field should have the same parameters than admin to work well.

<div class="form-group "> 
<input type="text" name="mac" class="ip_addr form-control input-sm" placeholder="MAC address" value="00:00:XX:XX:XX:XX" size="30" data-cip-id="jQuery342845642"> 
</div>

Is there a way to fix it, or a configuration I have missed?

Thanks,

BenVia74 commented 5 years ago

I checked code and have found the reason.

The mac address can't be edit by normal user when multicast module is enable.

It's a normal behavior? Regards.

bitking commented 2 years ago

I have the exact same issue. When disabling Multicase module a normal user is able to edit mac address field again.

Any reason as to why this is the case..?