Bugzilla – Attachment 150064 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), 4.13 KB, created by
Pedro Amorim
on 2023-04-21 16:57:19 UTC
(
hide
)
Description:
Bug 32968: ERM granular permissions - Agreements
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2023-04-21 16:57:19 UTC
Size:
4.13 KB
patch
obsolete
>From 9fee65fe8c89da6e3b90f01bef900cfd62296e91 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> >--- > .../js/vue/components/ERM/AgreementsList.vue | 21 +++++++++++-------- > .../js/vue/components/ERM/AgreementsShow.vue | 3 +++ > .../vue/components/ERM/AgreementsToolbar.vue | 6 ++++++ > 3 files changed, 21 insertions(+), 9 deletions(-) > >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 c613a84836..f535eb863f 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 >@@ -86,6 +86,7 @@ export default { > escape_str, > agreement_table_settings, > filters, >+ permissions, > } > }, > data: function () { >@@ -128,16 +129,18 @@ export default { > }, > actions: { > 0: ["show"], >- "-1": this.embedded >- ? [ >- { >- select: { >- text: this.$__("Select"), >- icon: "fa fa-check", >+ ...((permissions.agreement.write || this.embedded) && { >+ "-1": this.embedded >+ ? [ >+ { >+ select: { >+ text: this.$__("Select"), >+ icon: "fa fa-check", >+ }, > }, >- }, >- ] >- : ["edit", "delete"], >+ ] >+ : ["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 4bc8d8be17..22c965b82d 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 035c326683..96599ae7ca 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