diff --git a/assets/resources/templates/index.tmpl b/assets/resources/templates/index.tmpl
index e0cb0aec5..8a45c6272 100644
--- a/assets/resources/templates/index.tmpl
+++ b/assets/resources/templates/index.tmpl
@@ -33,14 +33,15 @@
diff --git a/docker/demo/Dockerfile b/docker/demo/Dockerfile
index 1d057195b..f88d91469 100644
--- a/docker/demo/Dockerfile
+++ b/docker/demo/Dockerfile
@@ -9,4 +9,4 @@ RUN wget -qO- https://dl.photoprism.org/fixtures/demo.tar.gz | tar xvz -C Pictur
RUN photoprism import
# Start PhotoPrism server
-CMD photoprism start
+CMD photoprism --public start
diff --git a/frontend/src/app.js b/frontend/src/app.js
index ea5a37176..98c3b3124 100644
--- a/frontend/src/app.js
+++ b/frontend/src/app.js
@@ -23,6 +23,7 @@ import { Settings } from "luxon";
const config = new Config(window.localStorage, window.appConfig);
const viewer = new Viewer();
const clipboard = new Clipboard(window.localStorage, "photo_clipboard");
+const isPublic = config.getValue("public");
// Assign helpers to VueJS prototype
Vue.prototype.$event = Event;
@@ -69,7 +70,7 @@ const router = new Router({
router.beforeEach((to, from, next) => {
if(to.matched.some(record => record.meta.admin)) {
- if (Session.isAdmin()) {
+ if (isPublic || Session.isAdmin()) {
next();
} else {
next({
@@ -78,7 +79,7 @@ router.beforeEach((to, from, next) => {
});
}
} else if(to.matched.some(record => record.meta.auth)) {
- if (Session.isUser()) {
+ if (isPublic || Session.isUser()) {
next();
} else {
next({
diff --git a/frontend/src/component/p-navigation.vue b/frontend/src/component/p-navigation.vue
index 8bfa184db..0c2fbe1f5 100644
--- a/frontend/src/component/p-navigation.vue
+++ b/frontend/src/component/p-navigation.vue
@@ -146,7 +146,7 @@
-
+
camera_roll
@@ -156,7 +156,7 @@
-
+
settings
@@ -166,7 +166,7 @@
-
+
power_settings_new
@@ -176,7 +176,7 @@
-
+
lock
@@ -200,6 +200,7 @@
drawer: null,
mini: mini,
session: this.$session,
+ isPublic: this.$config.getValue("public"),
};
},
methods: {
diff --git a/frontend/tests/acceptance/navigate.js b/frontend/tests/acceptance/navigate.js
index 68c06dd68..b31375248 100644
--- a/frontend/tests/acceptance/navigate.js
+++ b/frontend/tests/acceptance/navigate.js
@@ -20,8 +20,4 @@ test('Navigate', async t => {
await t
.click('a[href="/labels"]')
.expect(Selector('div.p-page-labels').exists, {timeout: 5000}).ok();
- await page.openNav();
- await t
- .click('a[href="/login"]')
- .expect(Selector('div.p-page-login').exists, {timeout: 5000}).ok();
});