Bug 2170 - Adding 'edititems' user-permission
Summary: Adding 'edititems' user-permission
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Authentication (show other bugs)
Version: Main
Hardware: All All
: PATCH-Sent (DO NOT USE) enhancement (vote)
Assignee: Galen Charlton
QA Contact: Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-27 08:41 UTC by Chris Cormack
Modified: 2012-10-25 23:04 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
functional example of both 'editcatalogue' and 'edititems' user-perms (41.21 KB, image/png)
2008-05-27 09:13 UTC, Chris Cormack
Details
functional example of 'editcatalogue' user-perm only (28.35 KB, image/png)
2008-05-27 09:14 UTC, Chris Cormack
Details
functional example of 'edititems' user-perm only (29.68 KB, image/png)
2008-05-27 09:17 UTC, Chris Cormack
Details
1) example of 'edititems' user-perm with independent-branches (52.12 KB, image/png)
2008-05-27 09:30 UTC, Chris Cormack
Details
2) example of 'edititems' user-perm with independent-branches (64.90 KB, image/png)
2008-05-27 09:31 UTC, Chris Cormack
Details
Follow-up patch with template revisions (20.19 KB, patch)
2010-07-23 19:02 UTC, Owen Leonard
Details | Diff | Splinter Review
Revised fix (18.80 KB, patch)
2010-12-13 14:16 UTC, Owen Leonard
Details | Diff | Splinter Review
Follow-up fix (7.21 KB, patch)
2011-02-10 21:23 UTC, Owen Leonard
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Cormack 2010-05-21 00:47:23 UTC


---- Reported by mason@kohaaloha.com 2008-05-27 08:41:01 ----

This mod basically splits the existing 'edit-catalogue' user-permission into 2 permissions ('edit-catalogue' and 'edititems')



---- Additional Comments From mason@kohaaloha.com 2008-05-27 09:13:22 ----

Created an attachment
functional example of both 'editcatalogue' and 'edititems' user-perms





---- Additional Comments From mason@kohaaloha.com 2008-05-27 09:14:58 ----

Created an attachment
functional example of 'editcatalogue' user-perm only 





---- Additional Comments From mason@kohaaloha.com 2008-05-27 09:17:28 ----

Created an attachment
functional example of 'edititems' user-perm only 





---- Additional Comments From mason@kohaaloha.com 2008-05-27 09:27:33 ----

FYI: this user-perm works with the independent-branches syspref

staff can only edit items with the same branchcode as them, with this syspref on





---- Additional Comments From mason@kohaaloha.com 2008-05-27 09:30:29 ----

Created an attachment
1) example of 'edititems' user-perm with independent-branches





---- Additional Comments From mason@kohaaloha.com 2008-05-27 09:31:04 ----

Created an attachment
2) example of 'edititems' user-perm with independent-branches





---- Additional Comments From mason@kohaaloha.com 2008-05-27 11:36:33 ----

patches sent



---- Additional Comments From nengard@gmail.com 2009-12-17 00:48:46 ----

edititems does not appear as a permission in the most recent version of HEAD



---- Additional Comments From nengard@gmail.com 2010-02-07 15:04:50 ----

I don't see this patch in the patches email - was it ever submitted?



--- Bug imported by chris@bigballofwax.co.nz 2010-05-21 00:47 UTC  ---

This bug was previously known as _bug_ 2170 at http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=2170
Imported an attachment (id=524)
Imported an attachment (id=525)
Imported an attachment (id=526)
Imported an attachment (id=527)
Imported an attachment (id=528)

Unknown Component Authentication
   Using default product and component set in Parameters 
Actual time not defined. Setting to 0.0
The original reporter of this bug does not have
   an account here. Reassigning to the person who moved
   it here: chris@bigballofwax.co.nz.
   Previous reporter was mason@kohaaloha.com.
The original assignee of this bug does not have
   an account here. Reassigning to the default assignee
   for the component, chris@bigballofwax.co.nz.
   Previous assignee was mason@kohaaloha.com.
Bug reassigned, setting status to "NEW".
   Previous status was "ASSIGNED".
The original submitter of attachment 524 [details] is unknown.
   Reassigning to the person who moved it here: chris@bigballofwax.co.nz.
The original submitter of attachment 525 [details] is unknown.
   Reassigning to the person who moved it here: chris@bigballofwax.co.nz.
The original submitter of attachment 526 [details] is unknown.
   Reassigning to the person who moved it here: chris@bigballofwax.co.nz.
The original submitter of attachment 527 [details] is unknown.
   Reassigning to the person who moved it here: chris@bigballofwax.co.nz.
The original submitter of attachment 528 [details] is unknown.
   Reassigning to the person who moved it here: chris@bigballofwax.co.nz.

Comment 1 Owen Leonard 2010-07-23 14:47:16 UTC
This feature is now working in HEAD, although I see that there are still places in the template which do not respect the setting: Links to "edit items" which should be missing or disabled when the user lacks that permission.
Comment 2 Owen Leonard 2010-07-23 19:02:36 UTC Comment hidden (obsolete)
Comment 3 Owen Leonard 2010-12-03 15:45:55 UTC
Original patch will probably not apply cleanly anymore. A revised version of this fix can be found here: http://gitorious.org/koha-dev/koha-dev/commits/ps-Bug-2170-eddititems-permission-markup-2010-07-23
Comment 4 Owen Leonard 2010-12-13 14:16:16 UTC
Created attachment 2837 [details] [review]
Revised fix

Revised for current HEAD.
Comment 5 Colin Campbell 2010-12-13 15:33:34 UTC
Signed off Owen's revised patch. Also sent a patch adding the permission check to another location where edit items can be called
Comment 6 Chris Cormack 2010-12-14 00:13:38 UTC
Patches pushed, please test
Comment 7 MJ Ray (software.coop) 2011-01-05 23:21:45 UTC
This bug is mentioned in:
Updated fix for Bug 2170,	Adding 'edititems' user-permission http://lists.koha-community.org/pipermail/koha-patches/2010-December/013247.html
Updated fix for Bug 2170,	Adding 'edititems' user-permission http://lists.koha-community.org/pipermail/koha-patches/2010-December/013249.html
Bug 2170 Supplementary Fix Wrap link in	permissions check http://lists.koha-community.org/pipermail/koha-patches/2010-December/013250.html
Comment 8 Owen Leonard 2011-02-04 17:19:01 UTC
I see something that needs a correction: If a user has 'editcatalogue" permission but not 'edititems' permission they should not be offered the option on addbiblio.pl to 'Save and edit items.' The default should be 'Save and view record.'
Comment 9 Owen Leonard 2011-02-10 21:23:19 UTC
Created attachment 3126 [details] [review]
Follow-up fix

Save button and duplicate confirmation redirects must respect
the edititems permission: Users without permission to edit items
should not be redirected to the edit items screen.
Comment 10 Nicole C. Engard 2011-02-11 14:00:37 UTC
On testing this patch I found the following:

I logged in as a staff member with editcatalog permissions but not edititems and when i clicked save when editing a bib record it said I didn't have permission and logged me out.  I think it should have brought me to the edited bib record.

Also - less major - a whitespace error:

.dotest/patch:31: space before tab in indent.
        background : #FFF none;
warning: 1 line adds whitespace errors.
Comment 11 Chris Cormack 2011-02-13 20:31:20 UTC
Nicole, you signed off on the patch, but you have some comments, is it worth pushing it, or should I wait til the rest is addressed?
Comment 12 Nicole C. Engard 2011-02-13 20:33:14 UTC
Owen and I talked on IRC and found that I didn't really have a problem - so that's why I signed off :) No need to wait.
Comment 13 Chris Cormack 2011-02-15 19:54:16 UTC
Pushed, please test and mark resolved