Bug 12098: Refactor can_*_subscription in C4::Serials
authorJonathan Druart <jonathan.druart@biblibre.com>
Wed, 16 Apr 2014 14:58:36 +0000 (16:58 +0200)
committerGalen Charlton <gmc@esilibrary.com>
Fri, 18 Apr 2014 20:46:00 +0000 (20:46 +0000)
commit4d78b9588a9f5fc68142b9d1556686072e7b5dba
tree92fec3698ebf226a30988cec59b4cfbcf8c9f5a6
parent4f7803e469a41cafb993c6d41e6481499e6cca93
Bug 12098: Refactor can_*_subscription in C4::Serials

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested on top of patches for 12048 and 12080.

Subscription search
- superlibrarian, IndyBranches on/off - always sees all subscriptions
- superserials, IndyBranches on/off - always sees all subscriptions
- no superserials, IndyBranches on - only sees own subscriptions
Note: Subscriptions without branches will only show, when all subscriptions
      are visible. In a future enh it might be good to enforce setting a
      branch, when IndyBranches is used.
- no superserials, IndyBranches off - always sees all subscriptions

Subscription editing
- superlibrarian, IndyBranches on/off - can edit all subscriptions
- superserials, IndyBranches on/off - can edit all subscriptions
- no superserials, IndyBranches on - can only edit own subscriptons and
  subscriptions without branch
  NOTE: it would make sense to also allow Edit > Edit as new (duplicate)
  here, so one can copy the subscription from another branch to modify
  it for the own branch.

Passes tests in t, xt and QA script, also newly provided unit tests.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
C4/Serials.pm