Skip to content

Commit 10e2777

Browse files
committed
Fix app store link and hide it for users (fix #18495 #18500)
Signed-off-by: Julius Härtl <[email protected]>
1 parent 0c21e01 commit 10e2777

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

apps/workflowengine/src/components/Workflow.vue

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@
1313
:operation="operation"
1414
@click.native="createNewRule(operation)" />
1515

16-
<a :key="'add'" :href="appstoreUrl" class="actions__item colored more">
16+
<a v-if="showAppStoreHint"
17+
:key="'add'"
18+
:href="appstoreUrl"
19+
class="actions__item colored more">
1720
<div class="icon icon-add" />
1821
<div class="actions__item__description">
1922
<h3>{{ t('workflowengine', 'More flows') }}</h3>
@@ -49,6 +52,7 @@ import Rule from './Rule'
4952
import Operation from './Operation'
5053
import { mapGetters, mapState } from 'vuex'
5154
import { loadState } from '@nextcloud/initial-state'
55+
import { generateUrl } from '@nextcloud/router'
5256
5357
const ACTION_LIMIT = 3
5458
@@ -61,7 +65,7 @@ export default {
6165
data() {
6266
return {
6367
showMoreOperations: false,
64-
appstoreUrl: '/index.php/settings/apps/workflow',
68+
appstoreUrl: generateUrl('settings/apps/workflow'),
6569
scope: loadState('workflowengine', 'scope'),
6670
}
6771
},
@@ -81,6 +85,9 @@ export default {
8185
}
8286
return Object.values(this.operations).slice(0, ACTION_LIMIT)
8387
},
88+
showAppStoreHint() {
89+
return this.scope === 0 && OC.isUserAdmin()
90+
},
8491
},
8592
mounted() {
8693
this.$store.dispatch('fetchRules')

0 commit comments

Comments
 (0)