Bugzilla – Attachment 148799 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 - Licenses
Bug-32968-ERM-granular-permissions---Licenses.patch (text/plain), 3.95 KB, created by
Pedro Amorim
on 2023-03-28 09:35:26 UTC
(
hide
)
Description:
Bug 32968: ERM granular permissions - Licenses
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2023-03-28 09:35:26 UTC
Size:
3.95 KB
patch
obsolete
>From 52e78792f8a1c5b3ecc38b53b5d4cc2321915f49 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Tue, 28 Feb 2023 17:55:04 +0000 >Subject: [PATCH] Bug 32968: ERM granular permissions - Licenses > >--- > .../prog/js/vue/components/ERM/LicensesList.vue | 13 ++++++++----- > .../prog/js/vue/components/ERM/LicensesShow.vue | 4 +++- > .../prog/js/vue/components/ERM/LicensesToolbar.vue | 10 +++++++++- > 3 files changed, 20 insertions(+), 7 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesList.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesList.vue >index b42355685c..397dc948b9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesList.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesList.vue >@@ -38,6 +38,7 @@ export default { > table_id, > setConfirmationDialog, > setMessage, >+ permissions, > } > }, > data: function () { >@@ -274,11 +275,13 @@ export default { > ] > ) > >- let n = createVNode("span", {}, [ >- editButton, >- " ", >- deleteButton, >- ]) >+ let n = permissions.licensing.write >+ ? createVNode("span", {}, [ >+ editButton, >+ " ", >+ deleteButton, >+ ]) >+ : createVNode("span", {}, []) > render(n, e) > } > ) >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesShow.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesShow.vue >index 64c1349cf2..2c11fc67f2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesShow.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesShow.vue >@@ -5,11 +5,12 @@ > {{ $__("License #%s").format(license.license_id) }} > <span class="action_links"> > <router-link >+ v-if="permissions.licensing.write" > :to="`/cgi-bin/koha/erm/licenses/edit/${license.license_id}`" > :title="$__('Edit')" > ><i class="fa fa-pencil"></i > ></router-link> >- <a @click="delete_license(license.license_id, license.name)" >+ <a v-if="permissions.licensing.write" @click="delete_license(license.license_id, license.name)" > ><i class="fa fa-trash"></i > ></a> > </span> >@@ -161,6 +162,7 @@ export default { > get_lib_from_av, > setConfirmationDialog, > setMessage, >+ permissions, > } > }, > data() { >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesToolbar.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesToolbar.vue >index 510fbff57e..8c24847258 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesToolbar.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesToolbar.vue >@@ -1,6 +1,9 @@ > <template> > <div id="toolbar" class="btn-toolbar"> >- <router-link to="/cgi-bin/koha/erm/licenses/add" class="btn btn-default" >+ <router-link >+ v-if="permissions.licensing.write" >+ to="/cgi-bin/koha/erm/licenses/add" >+ class="btn btn-default" > ><font-awesome-icon icon="plus" /> > {{ $__("New license") }}</router-link > > >@@ -9,6 +12,11 @@ > > <script> > export default { >+ setup() { >+ return { >+ permissions, >+ } >+ }, > name: "LicensesToolbar", > } > </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