Skip to content

Commit

Permalink
fix: don't assume user is trusted when force_logins is turned off (#1318
Browse files Browse the repository at this point in the history
)

Signed-off-by: Mathis Mensing <github@matmen.dev>
  • Loading branch information
matmen committed Jan 22, 2024
1 parent ef55129 commit b413fc2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/mixins/files.ts
Expand Up @@ -12,9 +12,7 @@ export default class FilesMixin extends Vue {
}

get isTrustedUser (): boolean {
const forceLogins = this.$store.getters['server/getConfig'].authorization.force_logins

return forceLogins === false || this.$store.getters['auth/getCurrentUser']?.username === '_TRUSTED_USER_'
return this.$store.getters['auth/getCurrentUser']?.username === '_TRUSTED_USER_'
}

getThumbUrl (meta: KlipperFileMeta, root: string, path: string, large: boolean, date?: number) {
Expand Down

0 comments on commit b413fc2

Please sign in to comment.