Bugzilla – Attachment 76134 Details for
Bug 11897
Stock Rotation for Koha
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11897: (follow-up) Make permissions more consistent
Bug-11897-follow-up-Make-permissions-more-consiste.patch (text/plain), 7.75 KB, created by
Martin Renvoize (ashimema)
on 2018-06-18 13:57:13 UTC
(
hide
)
Description:
Bug 11897: (follow-up) Make permissions more consistent
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2018-06-18 13:57:13 UTC
Size:
7.75 KB
patch
obsolete
>From 6274e158578a2cdf4e61f474febe43d941c26440 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Mon, 18 Jun 2018 14:42:28 +0100 >Subject: [PATCH] Bug 11897: (follow-up) Make permissions more consistent > >--- > catalogue/stockrotation.pl | 2 +- > installer/data/mysql/atomicupdate/stockrot_tables.sql | 4 ++-- > installer/data/mysql/userpermissions.sql | 4 ++-- > koha-tmpl/intranet-tmpl/prog/en/includes/biblio-view-menu.inc | 2 +- > koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc | 4 ++-- > koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc | 2 +- > .../intranet-tmpl/prog/en/modules/tools/stockrotation.tt | 2 +- > koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tt | 2 +- > 8 files changed, 11 insertions(+), 11 deletions(-) > >diff --git a/catalogue/stockrotation.pl b/catalogue/stockrotation.pl >index cc3008d97c..30660d79ce 100755 >--- a/catalogue/stockrotation.pl >+++ b/catalogue/stockrotation.pl >@@ -59,7 +59,7 @@ my ($template, $loggedinuser, $cookie) = get_template_and_user( > authnotrequired => 0, > flagsrequired => { > catalogue => 1, >- stockrotation => 'can_add_items_rotas', >+ stockrotation => 'manage_rota_items', > }, > } > ); >diff --git a/installer/data/mysql/atomicupdate/stockrot_tables.sql b/installer/data/mysql/atomicupdate/stockrot_tables.sql >index 8ca89a0c6b..68b2021995 100644 >--- a/installer/data/mysql/atomicupdate/stockrot_tables.sql >+++ b/installer/data/mysql/atomicupdate/stockrot_tables.sql >@@ -60,8 +60,8 @@ INSERT IGNORE INTO userflags (bit, flag, flagdesc, defaulton) VALUES > (23, 'stockrotation', 'Manage stockrotation operations', 0); > > INSERT IGNORE INTO permissions (module_bit, code, description) VALUES >- (23, 'can_edit_rotas', 'Create, edit and delete rotas'), >- (23, 'can_add_items_rotas', 'Add and remove items from rotas'); >+ (23, 'manage_rotas', 'Create, edit and delete rotas'), >+ (23, 'manage_rota_items', 'Add and remove items from rotas'); > > -- Notices > >diff --git a/installer/data/mysql/userpermissions.sql b/installer/data/mysql/userpermissions.sql >index 40001e5d77..e1c60f85eb 100644 >--- a/installer/data/mysql/userpermissions.sql >+++ b/installer/data/mysql/userpermissions.sql >@@ -86,6 +86,6 @@ INSERT INTO permissions (module_bit, code, description) VALUES > (21, 'enroll', 'Enroll patrons in clubs'), > (23, 'self_checkin_module', 'Log into the self check-in module'), > (23, 'self_checkout_module', 'Perform self checkout at the OPAC. It should be used for the patron matching the AutoSelfCheckID') >- (24, 'can_edit_rotas', 'Create, edit and delete rotas'), >- (24, 'can_add_items_rotas', 'Add and remove items from rotas') >+ (24, 'manage_rotas', 'Create, edit and delete rotas'), >+ (24, 'manage_rota_items', 'Add and remove items from rotas') > ; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/biblio-view-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/biblio-view-menu.inc >index a6230f323f..6556615a8f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/biblio-view-menu.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/biblio-view-menu.inc >@@ -40,7 +40,7 @@ > [% IF ( issuehistoryview ) %]<li class="active">[% ELSE %]<li>[% END %] > <a href="/cgi-bin/koha/catalogue/issuehistory.pl?biblionumber=[% biblio_object_id | url %]" >Checkout history</a></li> > [% IF ( CAN_user_tools_view_system_logs ) %][% IF ( logview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/tools/viewlog.pl?do_it=1&modules=CATALOGUING&action=MODIFY&object=[% biblio_object_id | url %]">Modification log</a> </li>[% END %] >-[% IF ( CAN_user_stockrotation_can_add_items_rotas && Koha.Preference('StockRotation') ) %][% IF ( stockrotationview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/catalogue/stockrotation.pl?biblionumber=[% biblio_object_id %]">Rota</a> </li>[% END %] >+[% IF ( CAN_user_stockrotation_manage_rota_items && Koha.Preference('StockRotation') ) %][% IF ( stockrotationview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/catalogue/stockrotation.pl?biblionumber=[% biblio_object_id %]">Rota</a> </li>[% END %] > </ul> > </div> > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc >index e590787ab5..6f6cf76058 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc >@@ -115,7 +115,7 @@ > [%# self_check %] > [%- CASE 'self_checkin_module' -%]<span>Log into the self check-in module. Note: this permission prevents the patron from using any other OPAC functionality</span> > [%- CASE 'self_checkout_module' -%]<span>Perform self checkout at the OPAC. It should be used for the patron matching the AutoSelfCheckID</span> >- [%- CASE 'can_add_items_rotas' -%]<span>Add and remove items from rotas</span> >- [%- CASE 'can_edit_rotas' -%]<span>Create, edit and delete rotas</span> >+ [%- CASE 'manage_rota_items' -%]<span>Add and remove items from rotas</span> >+ [%- CASE 'manage_rotas' -%]<span>Create, edit and delete rotas</span> > [%- END -%] > [%- END -%] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc >index 5660878970..bef464c37b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc >@@ -40,7 +40,7 @@ > [% IF ( CAN_user_tools_batch_upload_patron_images ) %] > <li><a href="/cgi-bin/koha/tools/picture-upload.pl">Upload patron images</a></li> > [% END %] >- [% IF ( CAN_user_stockrotation_can_edit_rotas && Koha.Preference('StockRotation') ) %] >+ [% IF ( CAN_user_stockrotation_manage_rotas && Koha.Preference('StockRotation') ) %] > <li><a href="/cgi-bin/koha/tools/stockrotation.pl">Stock rotation</a></li> > [% END %] > </ul> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stockrotation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stockrotation.tt >index f4a2c5a0d2..3560e568cb 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stockrotation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stockrotation.tt >@@ -97,7 +97,7 @@ > </button> > <ul class="dropdown-menu"> > <li><a href="?op=manage_stages&rota_id=[% rota.rota_id %]">Stages</a></li> >- [% IF CAN_user_stockrotation_can_add_items_rotas && rota.stockrotationstages.count > 0 %] >+ [% IF CAN_user_stockrotation_manage_rota_items && rota.stockrotationstages.count > 0 %] > <li><a href="?op=manage_items&rota_id=[% rota.rota_id %]">Items</a></li> > [% END %] > </ul> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tt >index d7efdf82ec..baaf67f200 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tt >@@ -72,7 +72,7 @@ > <dd>Upload patron images in a batch or one at a time</dd> > [% END %] > >- [% IF ( CAN_user_stockrotation_can_edit_rotas && Koha.Preference('StockRotation') ) %] >+ [% IF ( CAN_user_stockrotation_manage_rotas && Koha.Preference('StockRotation') ) %] > <dt><a href="/cgi-bin/koha/tools/stockrotation.pl">Stock rotation</a></dt> > <dd>Manage Stock rotation rotas, rota stages and rota items</dd> > [% END %] >-- >2.17.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 11897
:
25887
|
58207
|
58208
|
58209
|
58210
|
58211
|
58212
|
58213
|
58214
|
58215
|
58216
|
58217
|
58218
|
58219
|
58280
|
58281
|
58687
|
58692
|
58693
|
58694
|
58695
|
58696
|
60175
|
60715
|
61825
|
61826
|
61827
|
61828
|
61829
|
61830
|
61831
|
61832
|
61833
|
61834
|
61835
|
61836
|
61837
|
61838
|
61839
|
61885
|
62730
|
62750
|
62751
|
62752
|
62753
|
62754
|
62755
|
62756
|
62757
|
62758
|
62759
|
62760
|
62761
|
62762
|
62763
|
62764
|
62765
|
62766
|
62767
|
63063
|
63064
|
63065
|
63066
|
63067
|
63068
|
63069
|
63070
|
63071
|
63072
|
63073
|
63074
|
63075
|
63076
|
63077
|
63078
|
63079
|
63080
|
63114
|
64850
|
64851
|
65715
|
65716
|
65717
|
65718
|
65719
|
65720
|
65721
|
65722
|
65723
|
65724
|
65725
|
65726
|
65727
|
65728
|
65729
|
65730
|
65731
|
65732
|
65733
|
65734
|
65735
|
65736
|
65737
|
65738
|
65739
|
65740
|
65741
|
65742
|
65743
|
65744
|
65745
|
65746
|
65747
|
65748
|
65749
|
65750
|
65751
|
65752
|
65753
|
65754
|
65755
|
65756
|
65757
|
65758
|
66381
|
70496
|
70497
|
70498
|
70499
|
70500
|
70501
|
70502
|
70503
|
70504
|
70505
|
70506
|
70507
|
70508
|
70509
|
70510
|
70511
|
70512
|
70513
|
70514
|
70515
|
70516
|
70517
|
70518
|
70519
|
70520
|
70521
|
70522
|
70523
|
70524
|
72124
|
72125
|
72126
|
72127
|
72128
|
74003
|
74004
|
74005
|
74006
|
74007
|
74008
|
74010
|
74011
|
74012
|
74013
|
74014
|
74015
|
74016
|
74017
|
74197
|
74198
|
74199
|
74200
|
74201
|
74202
|
74203
|
74204
|
74205
|
74206
|
74319
|
74320
|
74360
|
74459
|
74460
|
74461
|
74462
|
74463
|
74464
|
74465
|
74466
|
74467
|
74468
|
74469
|
74470
|
75409
|
75410
|
75411
|
75412
|
75413
|
75414
|
75415
|
75416
|
75417
|
75418
|
75419
|
75420
|
76121
|
76122
|
76123
|
76124
|
76125
|
76126
|
76127
|
76128
|
76129
|
76130
|
76131
|
76132
|
76133
|
76134
|
76135
|
76144
|
76706
|
76707
|
76708
|
76709
|
76710
|
77623
|
77624
|
77625
|
77626
|
78387
|
78388
|
78389
|
78390
|
78391
|
78392
|
78393
|
78394
|
78404
|
78405
|
78406
|
78407
|
78408
|
79040
|
79041
|
79042
|
79043
|
79044
|
79738
|
79739
|
79740
|
79741
|
79742
|
79746
|
79747
|
79748
|
79749
|
79750
|
79964
|
79965
|
79966
|
79967
|
79968
|
79969
|
79970
|
79971
|
79972
|
79973
|
79974
|
79975
|
80068
|
80087
|
80088
|
80089
|
80090
|
80091
|
80092
|
80093
|
80094
|
80095
|
80096
|
80097
|
80098
|
80099
|
80100
|
80118
|
80260
|
80261
|
80262
|
80263
|
80264
|
80265
|
80266
|
80267
|
80268
|
80269
|
80270
|
80271
|
80272
|
80273
|
80274
|
80275
|
80289
|
80298
|
80299
|
80300