Skip to content

Commit ab1b857

Browse files
RubenVerborghkjetilk
authored andcommitted
Use default instead of defaultForNew.
Closes #758.
1 parent 9e85012 commit ab1b857

File tree

29 files changed

+40
-40
lines changed

29 files changed

+40
-40
lines changed

bin/lib/start.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,13 @@ function bin (argv, server) {
103103
a n0:Authorization;
104104
n0:accessTo <./>;
105105
n0:agent <${argv.owner}>;
106-
n0:defaultForNew <./>;
106+
n0:default <./>;
107107
n0:mode n0:Control, n0:Read, n0:Write.
108108
<#everyone>
109109
a n0:Authorization;
110110
n0: n2:Agent;
111111
n0:accessTo <./>;
112-
n0:defaultForNew <./>;
112+
n0:default <./>;
113113
n0:mode n0:Read.`
114114

115115
fs.writeFileSync(rootPath, defaultAcl)

default-templates/new-account/.acl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
acl:accessTo </>;
1414

1515
# All resources will inherit this authorization, by default
16-
acl:defaultForNew </>;
16+
acl:default </>;
1717

1818
# The owner has all of the access modes allowed
1919
acl:mode

default-templates/new-account/inbox/.acl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<{{webId}}>;
1111

1212
acl:accessTo <./>;
13-
acl:defaultForNew <./>;
13+
acl:default <./>;
1414

1515
acl:mode
1616
acl:Read, acl:Write, acl:Control.

default-templates/new-account/public/.acl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
a acl:Authorization;
88
acl:agent <{{webId}}>;
99
acl:accessTo <./>;
10-
acl:defaultForNew <./>;
10+
acl:default <./>;
1111
acl:mode acl:Read, acl:Write, acl:Control.
1212

1313
# The public has read permissions
1414
<#public>
1515
a acl:Authorization;
1616
acl:agentClass foaf:Agent;
1717
acl:accessTo <./>;
18-
acl:defaultForNew <./>;
18+
acl:default <./>;
1919
acl:mode acl:Read.

default-templates/new-account/settings/.acl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
acl:accessTo <./>;
1212

1313
# All settings resources will be private, by default, unless overridden
14-
acl:defaultForNew <./>;
14+
acl:default <./>;
1515

1616
# The owner has all of the access modes allowed
1717
acl:mode

test/integration/acl-oidc-test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ describe('ACL with WebID+OIDC over HTTP', function () {
128128
})
129129

130130
describe('empty .acl', function () {
131-
describe('with no defaultForNew in parent path', function () {
131+
describe('with no default in parent path', function () {
132132
it('should give no access', function (done) {
133133
var options = createOptions('/empty-acl/test-folder', 'user1')
134134
options.body = ''
@@ -156,7 +156,7 @@ describe('ACL with WebID+OIDC over HTTP', function () {
156156
})
157157
})
158158
})
159-
describe('with defaultForNew in parent path', function () {
159+
describe('with default in parent path', function () {
160160
before(function () {
161161
rm('/accounts-acl/tim.localhost/write-acl/empty-acl/another-empty-folder/test-file.acl')
162162
rm('/accounts-acl/tim.localhost/write-acl/empty-acl/test-folder/test-file')
@@ -687,7 +687,7 @@ describe('ACL with WebID+OIDC over HTTP', function () {
687687
})
688688
})
689689

690-
describe('defaultForNew', function () {
690+
describe('default', function () {
691691
before(function () {
692692
rm('/accounts-acl/tim.localhost/write-acl/default-for-new/.acl')
693693
rm('/accounts-acl/tim.localhost/write-acl/default-for-new/test-file.ttl')
@@ -696,11 +696,11 @@ describe('ACL with WebID+OIDC over HTTP', function () {
696696
var body = '<#Owner> a <http://www.w3.org/ns/auth/acl#Authorization>;\n' +
697697
' <http://www.w3.org/ns/auth/acl#accessTo> <./>;\n' +
698698
' <http://www.w3.org/ns/auth/acl#agent> <' + user1 + '>;\n' +
699-
' <http://www.w3.org/ns/auth/acl#defaultForNew> <./>;\n' +
699+
' <http://www.w3.org/ns/auth/acl#default> <./>;\n' +
700700
' <http://www.w3.org/ns/auth/acl#mode> <http://www.w3.org/ns/auth/acl#Read>, <http://www.w3.org/ns/auth/acl#Write>, <http://www.w3.org/ns/auth/acl#Control> .\n' +
701701
'<#Default> a <http://www.w3.org/ns/auth/acl#Authorization>;\n' +
702702
' <http://www.w3.org/ns/auth/acl#accessTo> <./>;\n' +
703-
' <http://www.w3.org/ns/auth/acl#defaultForNew> <./>;\n' +
703+
' <http://www.w3.org/ns/auth/acl#default> <./>;\n' +
704704
' <http://www.w3.org/ns/auth/acl#agentClass> <http://xmlns.com/foaf/0.1/Agent>;\n' +
705705
' <http://www.w3.org/ns/auth/acl#mode> <http://www.w3.org/ns/auth/acl#Read> .\n'
706706
it("user1 should be able to modify test directory's ACL file", function (done) {

test/integration/acl-tls-test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ describe('ACL with WebID+TLS', function () {
124124
})
125125

126126
describe('empty .acl', function () {
127-
describe('with no defaultForNew in parent path', function () {
127+
describe('with no default in parent path', function () {
128128
it('should give no access', function (done) {
129129
var options = createOptions('/acl-tls/empty-acl/test-folder', 'user1')
130130
options.body = ''
@@ -158,7 +158,7 @@ describe('ACL with WebID+TLS', function () {
158158
})
159159
})
160160
})
161-
describe('with defaultForNew in parent path', function () {
161+
describe('with default in parent path', function () {
162162
before(function () {
163163
rm('/acl-tls/write-acl/empty-acl/another-empty-folder/test-file.acl')
164164
rm('/acl-tls/write-acl/empty-acl/test-folder/test-file')
@@ -774,7 +774,7 @@ describe('ACL with WebID+TLS', function () {
774774
})
775775
})
776776

777-
describe('defaultForNew', function () {
777+
describe('default', function () {
778778
before(function () {
779779
rm('/acl-tls/write-acl/default-for-new/.acl')
780780
rm('/acl-tls/write-acl/default-for-new/test-file.ttl')
@@ -783,11 +783,11 @@ describe('ACL with WebID+TLS', function () {
783783
var body = '<#Owner> a <http://www.w3.org/ns/auth/acl#Authorization>;\n' +
784784
' <http://www.w3.org/ns/auth/acl#accessTo> <./>;\n' +
785785
' <http://www.w3.org/ns/auth/acl#agent> <' + user1 + '>;\n' +
786-
' <http://www.w3.org/ns/auth/acl#defaultForNew> <./>;\n' +
786+
' <http://www.w3.org/ns/auth/acl#default> <./>;\n' +
787787
' <http://www.w3.org/ns/auth/acl#mode> <http://www.w3.org/ns/auth/acl#Read>, <http://www.w3.org/ns/auth/acl#Write>, <http://www.w3.org/ns/auth/acl#Control> .\n' +
788788
'<#Default> a <http://www.w3.org/ns/auth/acl#Authorization>;\n' +
789789
' <http://www.w3.org/ns/auth/acl#accessTo> <./>;\n' +
790-
' <http://www.w3.org/ns/auth/acl#defaultForNew> <./>;\n' +
790+
' <http://www.w3.org/ns/auth/acl#default> <./>;\n' +
791791
' <http://www.w3.org/ns/auth/acl#agentClass> <http://xmlns.com/foaf/0.1/Agent>;\n' +
792792
' <http://www.w3.org/ns/auth/acl#mode> <http://www.w3.org/ns/auth/acl#Read> .\n'
793793
it("user1 should be able to modify test directory's ACL file", function (done) {

test/resources/accounts-acl/config/templates/new-account/.acl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
acl:accessTo </>;
1414

1515
# All resources will inherit this authorization, by default
16-
acl:defaultForNew </>;
16+
acl:default </>;
1717

1818
# The owner has all of the access modes allowed
1919
acl:mode

test/resources/accounts-acl/config/templates/new-account/inbox/.acl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<{{webId}}>;
1111

1212
acl:accessTo <./>;
13-
acl:defaultForNew <./>;
13+
acl:default <./>;
1414

1515
acl:mode
1616
acl:Read, acl:Write, acl:Control.

test/resources/accounts-acl/config/templates/new-account/settings/.acl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
acl:accessTo <./>;
1212

1313
# All settings resources will be private, by default, unless overridden
14-
acl:defaultForNew <./>;
14+
acl:default <./>;
1515

1616
# The owner has all of the access modes allowed
1717
acl:mode

0 commit comments

Comments
 (0)