mirror of
https://github.com/photoprism/photoprism.git
synced 2025-10-26 10:20:32 +08:00
Auth: Prevent unauthorized users from accessing the file browser #98
Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
@@ -125,7 +125,10 @@ import {Input, InputInvalid, ClickShort, ClickLong} from "common/input";
|
||||
export default {
|
||||
name: 'PPageFiles',
|
||||
props: {
|
||||
staticFilter: Object
|
||||
staticFilter: {
|
||||
type: Object,
|
||||
default: () => {},
|
||||
},
|
||||
},
|
||||
data() {
|
||||
const query = this.$route.query;
|
||||
@@ -173,12 +176,16 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (this.$config.deny("files", "access_library")) {
|
||||
this.$router.push({ name: "albums" });
|
||||
return;
|
||||
}
|
||||
|
||||
this.path = this.$route.params.pathMatch;
|
||||
|
||||
this.search();
|
||||
|
||||
this.subscriptions.push(Event.subscribe("folders", (ev, data) => this.onUpdate(ev, data)));
|
||||
|
||||
this.subscriptions.push(Event.subscribe("touchmove.top", () => this.refresh()));
|
||||
},
|
||||
destroyed() {
|
||||
|
||||
Reference in New Issue
Block a user