glpi-project / glpi-inventory-plugin

GLPI Inventory plugin
GNU Affero General Public License v3.0
46 stars 27 forks source link

Can't change agents modules and exceptions : permission denied with Super-Admin profile #267

Closed ghost closed 1 year ago

ghost commented 1 year ago

Describe the bug

Hello,

I installed a brand new GLPI 10.0.5 with GLPI Inventory plugin 1.0.5 and agent 1.4. When I wanted to add exceptions and remove a module on agents, any validation threw the error "You don't have the permission to do this action" (The GLPI permission denied, I don't remember the exact message).

Logs of fils/_log/access_errors.log threw a permission error telling that my user profile is missing read right for 'plugin_glpiinventory_agent'. When I checked the DB table user_profilerights, I could not see the entry 'plugin_glpiinventory_agent'.

When I compared the database with a working GLPI (v10.0.5 with plugin 1.0.4), the tbale was containing value 31 for line plugin_glpiinventory_agent (might not be these exact names).

I manually deleted plugin GLPI Inventory (installed with marketplace 1.0.5) and manually installed (in the dir marketplace) plugin v1.0.4 and error was fix.

If you can't reproduce the bug, it is possible that I have miss something in the installation as I've seen you've changed something regarding agent configuration right with version 1.0.5

To reproduce

  1. browse to GLPI Inventory > Configuration > Modules
  2. Add exception or change module activation
  3. Update and see permission error even with super-admin profile

Expected behavior

No permission denied

Operating system

Linux

GLPI Agent version

1.4

GLPI version

10.0.5

GLPIInventory plugin

1.0.5

Additional context

I'm sorry I don't have access anymore to the installation with the issue. Can't give you any logs and there might be some errors about table name/message.

cedric-anne commented 1 year ago

Hi,

Could you check if #255 solves your issue ?

smurdza commented 1 year ago

I have the same situation: GLPI : 10.0.3 GLPI Inventory : 1.06

Sabajanes commented 1 year ago

I have the same situation: GLPI : 10.0.2 GLPI Inventory : 1.0.6

cedric-anne commented 1 year ago

@smurdza @Sabajanes

Please upgrade GLPI to version 10.0.5.

smurdza commented 1 year ago

It is working :)

======================================================= GLPI 10.0.5 GLPIInventory : 1.0.6 But i have problem with inventory Network Devices "unknown content format":

[debug] [thread 1] #4, [http client] Using Compress::Zlib for compression [error] [thread 1] #4, [http client] unknown content format [debug] [thread 1] termination [debug] [thread 3] #3, [http client] Using Compress::Zlib for compression [error] [thread 3] #3, [http client] unknown content format

cedric-anne commented 1 year ago

Please open a new issue, it is probably a different issue.