Bug 21961 - Typo in permission keeps Did you mean? config from showing up
Summary: Typo in permission keeps Did you mean? config from showing up
Status: Pushed to Stable
Alias: None
Product: Koha
Classification: Unclassified
Component: System Administration (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Target Milestone: ---
Assignee: Katrin Fischer
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
: 21960 (view as bug list)
Depends on: 14391
Blocks:
  Show dependency treegraph
 
Reported: 2018-12-06 11:33 UTC by Katrin Fischer
Modified: 2018-12-12 10:59 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 21961: Fix typo in manage_didyoumean permission (2.61 KB, patch)
2018-12-06 11:46 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 21961: Fix typo in manage_didyoumean permission (2.67 KB, patch)
2018-12-06 11:55 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 21961: Fix typo in manage_didyoumean permission (2.73 KB, patch)
2018-12-07 14:16 UTC, Julian Maurice
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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