Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/photos.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorg Ehrke <developer@georgehrke.com>2020-05-28 12:11:36 +0300
committerGeorg Ehrke <developer@georgehrke.com>2020-06-05 11:36:14 +0300
commite1a2dd062f97275759d99324a280790fab084aae (patch)
tree4baec01c5f73f8acb77e2b02a9bcceb1343bede2 /src
parent18485a8a92fe379aee20becff184631bb3d85412 (diff)
Hide the location entry if Maps is disabled and user is not an admin
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
Diffstat (limited to 'src')
-rw-r--r--src/Photos.vue10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/Photos.vue b/src/Photos.vue
index 1d282a46..4bab4392 100644
--- a/src/Photos.vue
+++ b/src/Photos.vue
@@ -32,7 +32,10 @@
<AppNavigationItem :to="{name: 'albums'}" :title="t('photos', 'Your albums')" icon="icon-files-dark" />
<AppNavigationItem :to="{name: 'shared'}" :title="t('photos', 'Shared albums')" icon="icon-share" />
<AppNavigationItem :to="{name: 'tags'}" :title="t('photos', 'Tagged photos')" icon="icon-tag" />
- <AppNavigationItem :to="{name: 'maps'}" :title="t('photos', 'Locations')" icon="icon-address" />
+ <AppNavigationItem v-if="showLocationMenuEntry"
+ :to="{name: 'maps'}"
+ :title="t('photos', 'Locations')"
+ icon="icon-address" />
</AppNavigation>
<AppContent :class="{ 'icon-loading': loading }">
<router-view v-show="!loading" :loading.sync="loading" />
@@ -56,6 +59,8 @@ import AppNavigationItem from '@nextcloud/vue/dist/Components/AppNavigationItem'
import svgplaceholder from './assets/file-placeholder.svg'
import imgplaceholder from './assets/image.svg'
import videoplaceholder from './assets/video.svg'
+import isMapsInstalled from './services/IsMapsInstalled'
+import { getCurrentUser } from '@nextcloud/auth'
export default {
name: 'Photos',
@@ -71,6 +76,9 @@ export default {
svgplaceholder,
imgplaceholder,
videoplaceholder,
+ showLocationMenuEntry: getCurrentUser() === null
+ ? false
+ : getCurrentUser().isAdmin || isMapsInstalled,
}
},
}