changeset 3702:ee7dc0bea083

import_soundingresult: sysadmin sees full list of bottlenecks
author Thomas Junk <thomas.junk@intevation.de>
date Wed, 19 Jun 2019 11:40:58 +0200
parents 519c6e01607f
children b07511ff859e
files client/src/components/importconfiguration/types/Soundingresults.vue
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/components/importconfiguration/types/Soundingresults.vue	Wed Jun 19 11:34:43 2019 +0200
+++ b/client/src/components/importconfiguration/types/Soundingresults.vue	Wed Jun 19 11:40:58 2019 +0200
@@ -353,6 +353,7 @@
     ...mapState("bottlenecks", ["bottlenecks"]),
     ...mapState("user", ["user"]),
     ...mapGetters("usermanagement", ["userCountries"]),
+    ...mapGetters("user", ["isSysAdmin"]),
     importSoundingresultsLabel() {
       return this.$gettext("Import Soundingresults");
     },
@@ -369,7 +370,8 @@
     },
     availableBottlenecks() {
       const userCountrycode = this.userCountries[this.user];
-      if (userCountrycode === "global") return this.bottlenecks;
+      if (userCountrycode === "global" || this.isSysAdmin)
+        return this.bottlenecks;
       return this.bottlenecks.filter(
         bn => bn.properties.responsible_country === userCountrycode
       );