Begins interface check for permissiont. #274.
This commit is contained in:
parent
04a2c7d81a
commit
e64e22e74d
|
@ -13,7 +13,7 @@
|
|||
<div class="field is-pulled-right">
|
||||
<b-dropdown
|
||||
position="is-bottom-left"
|
||||
v-if="$userCaps.hasCapability('delete_tainacan-collections')"
|
||||
v-if="$userCaps.hasCapability('tnc_rep_delete_collections')"
|
||||
:disabled="!isSelectingCollections"
|
||||
id="bulk-actions-dropdown"
|
||||
aria-role="list"
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<div class="field is-pulled-right">
|
||||
<b-dropdown
|
||||
position="is-bottom-left"
|
||||
v-if="$userCaps.hasCapability('delete_tainacan-taxonomies')"
|
||||
v-if="$userCaps.hasCapability('tnc_rep_delete_collections')"
|
||||
:disabled="!isSelecting"
|
||||
id="bulk-actions-dropdown"
|
||||
aria-role="list"
|
||||
|
|
|
@ -347,10 +347,7 @@ UserCapabilitiesPlugin.install = function (Vue, options = {}) {
|
|||
|
||||
Vue.prototype.$userCaps = {
|
||||
hasCapability(key) {
|
||||
for (let i = 0; i < tainacan_plugin.user_caps.length; i++)
|
||||
if (tainacan_plugin.user_caps[i] == key)
|
||||
return true;
|
||||
return false;
|
||||
return tainacan_plugin[key];
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
:bread-crumb-items="[{ path: '', label: this.$i18n.get('collections') }]"/>
|
||||
<div
|
||||
class="sub-header"
|
||||
v-if="$userCaps.hasCapability('edit_tainacan-collections')">
|
||||
v-if="$userCaps.hasCapability('tnc_rep_edit_collections')">
|
||||
|
||||
<!-- New Collection button -->
|
||||
<div class="header-item">
|
||||
|
@ -212,7 +212,7 @@
|
|||
{{ $i18n.get('info_no_collections_' + statusOption.slug) }}
|
||||
</p>
|
||||
|
||||
<div v-if="$userCaps.hasCapability('edit_tainacan-collections') && status == undefined || status == ''">
|
||||
<div v-if="$userCaps.hasCapability('tnc_rep_edit_collections') && status == undefined || status == ''">
|
||||
<b-dropdown
|
||||
:disabled="isLoadingMetadatumMappers"
|
||||
id="collection-creation-options-dropdown"
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
:bread-crumb-items="[{ path: '', label: this.$i18n.get('taxonomies') }]"/>
|
||||
<div
|
||||
class="sub-header"
|
||||
v-if="$userCaps.hasCapability('edit_tainacan-taxonomies')">
|
||||
v-if="$userCaps.hasCapability('tnc_rep_edit_taxonomies')">
|
||||
|
||||
<!-- New Taxonomy Button ---- -->
|
||||
<div class="header-item">
|
||||
|
|
Loading…
Reference in New Issue