feat: expose accessible storage locations
This commit is contained in:
@@ -131,6 +131,13 @@ func TestUserManagementAndPrivateHome(t *testing.T) {
|
||||
if rr.Code != http.StatusOK || !strings.Contains(rr.Body.String(), "\"currentMask\":\"R\"") {
|
||||
t.Fatalf("shared read rule: %d %s", rr.Code, rr.Body.String())
|
||||
}
|
||||
req = httptest.NewRequest(http.MethodGet, "/chfs/roots", nil)
|
||||
req.AddCookie(&http.Cookie{Name: "JWT", Value: token})
|
||||
rr = httptest.NewRecorder()
|
||||
h.ServeHTTP(rr, req)
|
||||
if rr.Code != http.StatusOK || !strings.Contains(rr.Body.String(), "我的空间") || !strings.Contains(rr.Body.String(), "public") {
|
||||
t.Fatalf("accessible roots: %d %s", rr.Code, rr.Body.String())
|
||||
}
|
||||
var saved []map[string]any
|
||||
data, err := os.ReadFile(usersFile)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user