Mercurial > gemma
comparison client/src/router.js @ 2412:0ed53a7a1221
login fixed
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Thu, 28 Feb 2019 12:29:12 +0100 |
parents | d9758395e09d |
children | f39c4b432601 |
comparison
equal
deleted
inserted
replaced
2411:27d3e9eda8b6 | 2412:0ed53a7a1221 |
---|---|
166 component: Main, | 166 component: Main, |
167 meta: { | 167 meta: { |
168 requiresAuth: true | 168 requiresAuth: true |
169 }, | 169 }, |
170 beforeEnter: (to, from, next) => { | 170 beforeEnter: (to, from, next) => { |
171 this.$store.commit("application/searchQuery", ""); | 171 store.commit("application/searchQuery", ""); |
172 store.commit("application/showContextBox", false); | 172 store.commit("application/showContextBox", false); |
173 store.commit("application/contextBoxContent", ""); | 173 store.commit("application/contextBoxContent", ""); |
174 store.commit("application/showSearchbar", false); | 174 store.commit("application/showSearchbar", false); |
175 next(); | 175 next(); |
176 } | 176 } |
181 component: Main, | 181 component: Main, |
182 meta: { | 182 meta: { |
183 requiresAuth: true | 183 requiresAuth: true |
184 }, | 184 }, |
185 beforeEnter: (to, from, next) => { | 185 beforeEnter: (to, from, next) => { |
186 this.$store.commit("application/searchQuery", ""); | 186 store.commit("application/searchQuery", ""); |
187 store.commit("application/showContextBox", true); | 187 store.commit("application/showContextBox", true); |
188 store.commit("application/contextBoxContent", "bottlenecks"); | 188 store.commit("application/contextBoxContent", "bottlenecks"); |
189 store.commit("application/showSearchbar", true); | 189 store.commit("application/showSearchbar", true); |
190 next(); | 190 next(); |
191 } | 191 } |
200 beforeEnter: (to, from, next) => { | 200 beforeEnter: (to, from, next) => { |
201 const isWaterwayAdmin = store.getters["user/isWaterwayAdmin"]; | 201 const isWaterwayAdmin = store.getters["user/isWaterwayAdmin"]; |
202 if (!isWaterwayAdmin) { | 202 if (!isWaterwayAdmin) { |
203 next("/"); | 203 next("/"); |
204 } else { | 204 } else { |
205 this.$store.commit("application/searchQuery", ""); | 205 store.commit("application/searchQuery", ""); |
206 store.commit("application/showContextBox", true); | 206 store.commit("application/showContextBox", true); |
207 store.commit("application/contextBoxContent", "staging"); | 207 store.commit("application/contextBoxContent", "staging"); |
208 store.commit("application/showSearchbar", true); | 208 store.commit("application/showSearchbar", true); |
209 next(); | 209 next(); |
210 } | 210 } |
220 beforeEnter: (to, from, next) => { | 220 beforeEnter: (to, from, next) => { |
221 const isSysadmin = store.getters["user/isSysAdmin"]; | 221 const isSysadmin = store.getters["user/isSysAdmin"]; |
222 if (!isSysadmin) { | 222 if (!isSysadmin) { |
223 next("/"); | 223 next("/"); |
224 } else { | 224 } else { |
225 this.$store.commit("application/searchQuery", ""); | 225 store.commit("application/searchQuery", ""); |
226 store.commit("application/showContextBox", true); | 226 store.commit("application/showContextBox", true); |
227 store.commit("application/contextBoxContent", "stretches"); | 227 store.commit("application/contextBoxContent", "stretches"); |
228 store.commit("application/showSearchbar", true); | 228 store.commit("application/showSearchbar", true); |
229 next(); | 229 next(); |
230 } | 230 } |