phpMyFAQ icon indicating copy to clipboard operation
phpMyFAQ copied to clipboard

Unable to save user rights in User administration page

Open fbunadi opened this issue 3 years ago • 1 comments

Describe the bug There are 3 issues.

  1. When you load a user and save its profile, the layout appears to be duplicated.
  2. After you load a user and try to assign user rights, it doesn't save and has error "No ID specified"
  3. When you load 2 different users, the second user rights section doesn't get refreshed and displayed the right data.

To Reproduce Steps to reproduce the behavior:

Issue 1:

  1. Go to Users
  2. Click on Search box and type in the user you want to search
  3. Click save on "Profile of the user" section
  4. See error

Issue 2:

  1. Go to Users
  2. Click on Search box and load the user
  3. Assign rights on the User rights section
  4. Click save
  5. See error

Issue 3:

  1. Go to Users
  2. Click on Search box and load the user 1 eg: admin (the one that has more rights)
  3. Click on Search box and load the user 2 eg: anonymous
  4. See error -> incorrect user rights

Expected behavior For issue no 1, the section "Real name, Email and Super-admin" at the bottom shouldn't appear For issue no 2, user rights should be loaded properly and saved.

Screenshots Issue no 1: Saving user profile Screen Shot 2022-06-08 at 1 04 15 pm

Issue no 2: Saving user rights Screen Shot 2022-06-08 at 1 04 38 pm

Issue no 3: Not loading user rights properly Screen Shot 2022-06-08 at 1 33 41 pm Screen Shot 2022-06-08 at 1 33 32 pm

phpMyFAQ (please complete the following information):

  • phpMyFAQ version 3.14
  • PHP version 8.1
  • Database mariadb 10
  • Elasticsearch no

Desktop (please complete the following information):

  • OS: Mac OS Big Sur
  • Browser Chrome
  • Version 102

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context For issue no 3, the ajax seems returning the correct data but it's not reflected on the form. it seems to be an issue when the first user has more rights compared to the second user. However there is no problem when the reverse happens, i.e first user has less rights compared to the second user.

fbunadi avatar Jun 08 '22 03:06 fbunadi

I cannot reproduce the second issue, the other issues are fixed.

thorsten avatar Jun 08 '22 18:06 thorsten