:operation="operation"
@click.native="createNewRule(operation)" />
- <a :key="'add'" :href="appstoreUrl" class="actions__item colored more">
+ <a v-if="showAppStoreHint"
+ :key="'add'"
+ :href="appstoreUrl"
+ class="actions__item colored more">
<div class="icon icon-add" />
<div class="actions__item__description">
<h3>{{ t('workflowengine', 'More flows') }}</h3>
import Operation from './Operation'
import { mapGetters, mapState } from 'vuex'
import { loadState } from '@nextcloud/initial-state'
+import { generateUrl } from '@nextcloud/router'
const ACTION_LIMIT = 3
data() {
return {
showMoreOperations: false,
- appstoreUrl: '/index.php/settings/apps/workflow',
+ appstoreUrl: generateUrl('settings/apps/workflow'),
scope: loadState('workflowengine', 'scope'),
}
},
}
return Object.values(this.operations).slice(0, ACTION_LIMIT)
},
+ showAppStoreHint() {
+ return this.scope === 0 && OC.isUserAdmin()
+ },
},
mounted() {
this.$store.dispatch('fetchRules')