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