feat!: rename 'scope' to 'directory'

Directory makes it more clear of what it is. In addition, this will make it easier when
allowing for multiple directories in the future, since we can just name it 'directories', which is more clear than 'scopes'.
This commit is contained in:
Henrique Dias
2024-07-29 10:11:02 +02:00
parent a255fb51e2
commit d5e5052f63
6 changed files with 44 additions and 36 deletions
+6 -6
View File
@@ -50,7 +50,7 @@ func TestServerDefaults(t *testing.T) {
"sub/bar.txt": []byte("bar"),
})
srv := makeTestServer(t, "scope: "+dir)
srv := makeTestServer(t, "directory: "+dir)
client := gowebdav.NewClient(srv.URL, "", "")
// By default, reading permissions.
@@ -90,7 +90,7 @@ func TestServerAuthentication(t *testing.T) {
})
srv := makeTestServer(t, fmt.Sprintf(`
scope: %s
directory: %s
modify: true
users:
@@ -152,7 +152,7 @@ func TestServerRules(t *testing.T) {
})
srv := makeTestServer(t, fmt.Sprintf(`
scope: %s
directory: %s
modify: true
users:
@@ -194,16 +194,16 @@ func TestServerPermissions(t *testing.T) {
})
srv := makeTestServer(t, fmt.Sprintf(`
scope: %s
directory: %s
modify: true
users:
- username: a
password: a
scope: %s/a
directory: %s/a
- username: b
password: b
scope: %s/b
directory: %s/b
modify: false
`, dir, dir, dir))