Export user

Former-commit-id: 3ac186305dcd855b853a5c80ee8f90b50abd19cd
This commit is contained in:
Henrique Dias
2017-06-25 15:24:16 +01:00
parent a74ad79dd6
commit 224151e814
10 changed files with 35 additions and 33 deletions

View File

@@ -18,7 +18,7 @@ func matchURL(first, second string) bool {
// ServeHTTP determines if the request is for this plugin, and if all prerequisites are met.
func (m *FileManager) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, error) {
var (
u *user
u *User
code int
err error
)
@@ -37,7 +37,7 @@ func (m *FileManager) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, er
if _, ok := m.Users[username]; ok {
u = m.Users[username]
} else {
u = m.user
u = m.User
}
// Checks if the request URL is for the WebDav server
@@ -115,7 +115,7 @@ func (m *FileManager) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, er
}
// serveWebDAV handles the webDAV route of the File Manager.
func serveWebDAV(w http.ResponseWriter, r *http.Request, m *FileManager, u *user) (int, error) {
func serveWebDAV(w http.ResponseWriter, r *http.Request, m *FileManager, u *User) (int, error) {
var err error
// Checks for user permissions relatively to this path.