Bug 21961

Summary: Typo in permission keeps Did you mean? config from showing up
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: System AdministrationAssignee: Katrin Fischer <katrin.fischer>
Status: RESOLVED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: fridolin.somers, gmcharlt, julian.maurice, lucas, martin.renvoize, nick
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Who signed the patch off: Text to go in the release notes:
Version(s) released in:
Bug Depends on: 14391    
Bug Blocks:    
Attachments: Bug 21961: Fix typo in manage_didyoumean permission
Bug 21961: Fix typo in manage_didyoumean permission
Bug 21961: Fix typo in manage_didyoumean permission

Description Katrin Fischer 2018-12-06 11:33:03 UTC
Unfortunately the permission got added to the DB as manage_didyouean when it should be manage_didyoumean...
Comment 1 Katrin Fischer 2018-12-06 11:46:35 UTC
Created attachment 82903 [details] [review]
Bug 21961: Fix typo in manage_didyoumean permission

The typo in the installer files will cause problems on new
installations as the code for the permission is wrong.

This means that on new installations the Did you mean? section
on the administration page won't show up.

In order to fix this, we need to correct the code in
permissions, but also the permissions for users who
this permission has been given to.

To test:
- Start without the patch
- Use a new installation with the permission typo
- Log in as superlibrarian
- Verify that the "did you mean?" configuration page
  is not visible
- Create another staff user with permission to access
  staff and manage_didyoumean checked
- Verify configuration page remains invisible
- Apply patch and run database update
- Check both users again, the config page should now sohw
Comment 2 Katrin Fischer 2018-12-06 11:49:44 UTC
*** Bug 21960 has been marked as a duplicate of this bug. ***
Comment 3 Josef Moravec 2018-12-06 11:55:25 UTC
Created attachment 82904 [details] [review]
Bug 21961: Fix typo in manage_didyoumean permission

The typo in the installer files will cause problems on new
installations as the code for the permission is wrong.

This means that on new installations the Did you mean? section
on the administration page won't show up.

In order to fix this, we need to correct the code in
permissions, but also the permissions for users who
this permission has been given to.

To test:
- Start without the patch
- Use a new installation with the permission typo
- Log in as superlibrarian
- Verify that the "did you mean?" configuration page
  is not visible
- Create another staff user with permission to access
  staff and manage_didyoumean checked
- Verify configuration page remains invisible
- Apply patch and run database update
- Check both users again, the config page should now sohw

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 4 Julian Maurice 2018-12-07 14:16:20 UTC
Created attachment 82981 [details] [review]
Bug 21961: Fix typo in manage_didyoumean permission

The typo in the installer files will cause problems on new
installations as the code for the permission is wrong.

This means that on new installations the Did you mean? section
on the administration page won't show up.

In order to fix this, we need to correct the code in
permissions, but also the permissions for users who
this permission has been given to.

To test:
- Start without the patch
- Use a new installation with the permission typo
- Log in as superlibrarian
- Verify that the "did you mean?" configuration page
  is not visible
- Create another staff user with permission to access
  staff and manage_didyoumean checked
- Verify configuration page remains invisible
- Apply patch and run database update
- Check both users again, the config page should now sohw

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Comment 5 Julian Maurice 2018-12-07 14:19:59 UTC
> In order to fix this, we need to correct the code in permissions, but also the
> permissions for users who this permission has been given to.
Note that it shouldn't be necessary to manually update user_permissions (thanks to the 'ON UPDATE CASCADE' on the FK constraint, mysql takes care of it), but it is harmless, so we can keep both queries.
Comment 6 Nick Clemens 2018-12-11 20:59:36 UTC
Awesome work all!

Pushed to master for 19.05
Comment 7 Martin Renvoize 2018-12-12 10:59:47 UTC
Pushed to 18.11.x for 18.11.01
Comment 8 Lucas Gass 2018-12-21 21:10:54 UTC
missing 14391 dependency not backporting to 18.05