diff --git a/frontend/.env.dist b/frontend/.env.dist
index 8d4025a5d..80dafb7f9 100644
--- a/frontend/.env.dist
+++ b/frontend/.env.dist
@@ -1,3 +1,4 @@
GRAPHQL_URI=http://localhost:4000/graphql
DEFAULT_PUBLISHER_ID=2896
-//BUILD_COMMIT=0000000
\ No newline at end of file
+#BUILD_COMMIT=0000000
+ADMIN_AUTH_URL=http://localhost/admin/authenticate?token=$1
\ No newline at end of file
diff --git a/frontend/src/components/SidebarPlugin/SideBar.vue b/frontend/src/components/SidebarPlugin/SideBar.vue
index c33c132b0..d8b26318f 100755
--- a/frontend/src/components/SidebarPlugin/SideBar.vue
+++ b/frontend/src/components/SidebarPlugin/SideBar.vue
@@ -45,6 +45,7 @@
+
+
+
-
@@ -112,6 +121,10 @@ export default {
logout() {
this.$emit('logout')
},
+ admin() {
+ window.location = CONFIG.ADMIN_AUTH_URL.replace('$1',this.$store.state.token)
+ this.$store.dispatch('logout') // logout without redirect
+ },
getElopageLink() {
const pId = this.$store.state.publisherId
? this.$store.state.publisherId
diff --git a/frontend/src/config/index.js b/frontend/src/config/index.js
index 1f1819c62..6c7c49013 100644
--- a/frontend/src/config/index.js
+++ b/frontend/src/config/index.js
@@ -18,8 +18,9 @@ const environment = {
DEFAULT_PUBLISHER_ID: process.env.DEFAULT_PUBLISHER_ID || 2896,
}
-const server = {
+const endpoints = {
GRAPHQL_URI: process.env.GRAPHQL_URI || 'http://localhost:4000/graphql',
+ ADMIN_AUTH_URL: process.env.ADMIN_AUTH_URL || 'http://localhost/admin/authenticate?token=$1'
}
const options = {}
@@ -27,7 +28,7 @@ const options = {}
const CONFIG = {
...version,
...environment,
- ...server,
+ ...endpoints,
...options,
}
diff --git a/frontend/src/store/store.js b/frontend/src/store/store.js
index 6a229c161..1173a8685 100644
--- a/frontend/src/store/store.js
+++ b/frontend/src/store/store.js
@@ -87,6 +87,7 @@ export const store = new Vuex.Store({
username: '',
description: '',
token: null,
+ isAdmin: true, // TODO implement this properly
coinanimation: true,
newsletterState: null,
community: {