Bug 22370

Summary: OPAC users should not be allowed to view staff news items
Product: Koha Reporter: Nick Clemens <nick>
Component: OPACAssignee: Aleisha Amohia <aleisha>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: aleisha, martin.renvoize
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 14272    
Bug Blocks:    
Attachments: Bug 22370: Prevent OPAC users from seeing staff news from URL
Bug 22370: Prevent OPAC users from seeing staff news from URL
Bug 22370: Prevent OPAC users from seeing staff news from URL

Description Nick Clemens 2019-02-19 13:57:07 UTC
To recreate:
1 - Have some opac and staff only news items
2 - On the opac view a single news item
3 - Change the id in the link to the id of the staff item
4 - View the staff news on the opac? not good
Comment 1 Aleisha Amohia 2019-02-19 21:06:56 UTC
Created attachment 85314 [details] [review]
Bug 22370: Prevent OPAC users from seeing staff news from URL

To test:
1) Have some OPAC and staff only news items
2) On the OPAC view a single news item
3) Change the ID in the URL to the ID of a staff news item
4) Notice you can view the news item without any problems
5) Apply the patch and refresh the page
6) An error should show that the news item doesn't exist
7) Confirm you can still view OPAC news items individually

Sponsored-by: Catalyst IT
Comment 2 Josef Moravec 2019-02-27 20:35:08 UTC
Created attachment 85797 [details] [review]
Bug 22370: Prevent OPAC users from seeing staff news from URL

To test:
1) Have some OPAC and staff only news items
2) On the OPAC view a single news item
3) Change the ID in the URL to the ID of a staff news item
4) Notice you can view the news item without any problems
5) Apply the patch and refresh the page
6) An error should show that the news item doesn't exist
7) Confirm you can still view OPAC news items individually

Sponsored-by: Catalyst IT

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 3 Katrin Fischer 2019-02-28 06:42:00 UTC
Created attachment 85804 [details] [review]
Bug 22370: Prevent OPAC users from seeing staff news from URL

To test:
1) Have some OPAC and staff only news items
2) On the OPAC view a single news item
3) Change the ID in the URL to the ID of a staff news item
4) Notice you can view the news item without any problems
5) Apply the patch and refresh the page
6) An error should show that the news item doesn't exist
7) Confirm you can still view OPAC news items individually

Sponsored-by: Catalyst IT

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Nick Clemens 2019-03-04 18:49:19 UTC
Awesome work all!

Pushed to master for 19.05
Comment 5 Martin Renvoize 2019-03-05 14:42:44 UTC
Bug against enhancement for 19.05.