Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
06200775d5 | ||
|
|
8a10baa815 | ||
|
|
98c22ece8d | ||
|
|
63247f6e8c | ||
|
|
58dd812008 | ||
|
|
1575fafec8 | ||
|
|
8c935eb51d | ||
|
|
7f3a26e1c0 | ||
|
|
fe834aa244 | ||
|
|
6620a1bf41 |
@@ -26,6 +26,8 @@ build:
|
||||
- goos: freebsd
|
||||
goarch: arm
|
||||
goarm: 6
|
||||
- goos: linux
|
||||
goarch: arm64
|
||||
|
||||
archive:
|
||||
name_template: "{{.Os}}-{{.Arch}}-{{ .ProjectName }}"
|
||||
|
||||
@@ -1,13 +1,18 @@
|
||||
import cookie from './cookie'
|
||||
import store from '@/store'
|
||||
import router from '@/router'
|
||||
import { Base64 } from 'js-base64'
|
||||
|
||||
function parseToken (token) {
|
||||
let path = store.state.baseURL
|
||||
if (path === '') path = '/'
|
||||
document.cookie = `auth=${token}; max-age=86400; path=${path}`
|
||||
let res = token.split('.')
|
||||
let user = JSON.parse(window.atob(res[1]))
|
||||
let user = JSON.parse(Base64.decode(res[1]))
|
||||
if (!user.commands) {
|
||||
user.commands = []
|
||||
}
|
||||
|
||||
store.commit('setJWT', token)
|
||||
store.commit('setUser', user)
|
||||
}
|
||||
|
||||
@@ -163,11 +163,14 @@ export default {
|
||||
this.lockPassword = user.lockPassword
|
||||
this.filesystem = user.filesystem
|
||||
this.username = user.username
|
||||
this.commands = user.commands.join(' ')
|
||||
this.css = user.css
|
||||
this.permissions = user.permissions
|
||||
this.locale = user.locale
|
||||
|
||||
if (user.commands) {
|
||||
this.commands = user.commands.join(' ')
|
||||
}
|
||||
|
||||
for (let rule of user.rules) {
|
||||
if (rule.allow) {
|
||||
this.rules += 'allow '
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
c3a712eda3f79ed47b660fa8d23b850867f2d491
|
||||
@@ -23,7 +23,7 @@ import (
|
||||
|
||||
const (
|
||||
// Version is the current File Manager version.
|
||||
Version = "1.4.0"
|
||||
Version = "1.4.2"
|
||||
|
||||
ListViewMode = "list"
|
||||
MosaicViewMode = "mosaic"
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
"clipboard": "^1.7.1",
|
||||
"codemirror": "^5.31.0",
|
||||
"filesize": "^3.5.11",
|
||||
"js-base64": "^2.4.0",
|
||||
"moment": "^2.19.2",
|
||||
"normalize.css": "^7.0.0",
|
||||
"noty": "^3.1.3",
|
||||
|
||||
@@ -1 +1 @@
|
||||
88021017420cd941317b4af47937c56060e5b104
|
||||
6e37237fbee662acdaf51c879107db450ea135ed
|
||||
Reference in New Issue
Block a user