snipe-it icon indicating copy to clipboard operation
snipe-it copied to clipboard

Non super admins cannot run LDAP sync

Open emike09 opened this issue 5 years ago • 2 comments

Please confirm you have done the following before posting your bug report:

Describe the bug Non Super Admin Administrators are unable to run the LDAP Sync. When clicking Synchronize, a 403 Forbidden error comes up. These other IT administrators have the every right under groups, except for Superuser.

To Reproduce Steps to reproduce the behavior:

  1. Log in as a non-super user admin that has all rights, besides Super Admin.
  2. Go to People, LDAP Sync
  3. Click Synchronize
  4. Administrator is presented with a sad panda. 403 Forbidden.

Expected behavior For groups allowed to view, create, edit, and delete users, I expect these admins to be able to run LDAP sync.

Screenshots image

Server (please complete the following information):

  • 5.0.11
  • OS: Ubuntu Server 20.04
  • Web Server: nGinX
  • PHP Version: 7.4

Desktop (please complete the following information):

  • OS: Windows 10 2004
  • Browser Chrome

I ran with Debug mode enabled, but I couldn't really see anything pertinent. In laravel.log, I get the following error:

[2020-12-14 14:28:54] production.ERROR: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'note' (SQL: alter table accessories_users add note varchar(191) null) {"exception":"[object] (Illuminate\Database\QueryException(code: 42S21): SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'note' (SQL: alter table accessories_users add note varchar(191) null) at /var/www/inventory.utahca.org/vendor/laravel/framework/src/Illuminate/Database/Connection.php:669) [stacktrace]

I was unable to test on the Demo site as LDAP is not enabled there.

emike09 avatar Dec 14 '20 21:12 emike09

Can confirm this, LDAP Sync only working as a super admin.

nilsrb avatar Dec 17 '20 10:12 nilsrb

https://github.com/snipe/snipe-it/issues/8871#issue-758558007

UserGoodtm avatar Dec 19 '20 18:12 UserGoodtm