Bugzilla – Attachment 149427 Details for
Bug 32968
Create granular permissions for ERM
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32968: ERM granular permissions - Agreements
Bug-32968-ERM-granular-permissions---Agreements.patch (text/plain), 3.41 KB, created by
Pedro Amorim
on 2023-04-11 10:19:06 UTC
(
hide
)
Description:
Bug 32968: ERM granular permissions - Agreements
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2023-04-11 10:19:06 UTC
Size:
3.41 KB
patch
obsolete
>From 6644d2778f91928a68f37dde922125df474fb532 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Tue, 28 Feb 2023 17:55:35 +0000 >Subject: [PATCH] Bug 32968: ERM granular permissions - Agreements > >Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> >--- > .../prog/js/vue/components/ERM/AgreementsList.vue | 5 ++++- > .../prog/js/vue/components/ERM/AgreementsShow.vue | 3 +++ > .../prog/js/vue/components/ERM/AgreementsToolbar.vue | 6 ++++++ > 3 files changed, 13 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsList.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsList.vue >index 90e4f1b6c64..e5319ad2823 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsList.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsList.vue >@@ -85,6 +85,7 @@ export default { > escape_str, > agreement_table_settings, > filters, >+ permissions, > } > }, > data: function () { >@@ -129,7 +130,9 @@ export default { > }, > actions: { > 0: ["show"], >- "-1": ["edit", "delete"], >+ ...(permissions.agreement.write && { >+ "-1": ["edit", "delete"], >+ }), > }, > default_filters: { > "user_roles.user_id": function () { >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsShow.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsShow.vue >index 4bc8d8be176..22c965b82df 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsShow.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsShow.vue >@@ -5,11 +5,13 @@ > {{ $__("Agreement #%s").format(agreement.agreement_id) }} > <span class="action_links"> > <router-link >+ v-if="permissions.agreement.write" > :to="`/cgi-bin/koha/erm/agreements/edit/${agreement.agreement_id}`" > :title="$__('Edit')" > ><i class="fa fa-pencil"></i > ></router-link> > <a >+ v-if="permissions.agreement.write" > @click=" > delete_agreement(agreement.agreement_id, agreement.name) > " >@@ -318,6 +320,7 @@ export default { > get_lib_from_av, > setConfirmationDialog, > setMessage, >+ permissions, > } > }, > data() { >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsToolbar.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsToolbar.vue >index 035c3266835..96599ae7ca5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsToolbar.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsToolbar.vue >@@ -1,6 +1,7 @@ > <template> > <div id="toolbar" class="btn-toolbar"> > <router-link >+ v-if="permissions.agreement.write" > to="/cgi-bin/koha/erm/agreements/add" > class="btn btn-default" > ><font-awesome-icon icon="plus" /> >@@ -11,6 +12,11 @@ > > <script> > export default { >+ setup() { >+ return { >+ permissions, >+ } >+ }, > name: "AgreementsToolbar", > } > </script> >-- >2.30.2
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 32968
:
146698
|
147466
|
147510
|
147511
|
147513
|
147514
|
147515
|
147516
|
147517
|
147518
|
147559
|
148797
|
148798
|
148799
|
148800
|
148801
|
148802
|
148803
|
148804
|
148959
|
148960
|
148961
|
148962
|
148963
|
148964
|
148965
|
148966
|
149423
|
149424
|
149425
|
149426
|
149427
|
149428
|
149429
|
149430
|
150060
|
150061
|
150062
|
150063
|
150064
|
150065
|
150066
|
150067