Skip to content

Commit 6f09c3c

Browse files
committed
update policy
1 parent 8b08c87 commit 6f09c3c

2 files changed

Lines changed: 190 additions & 186 deletions

File tree

t/inline-allow-deny.json

Lines changed: 128 additions & 124 deletions
Original file line numberDiff line numberDiff line change
@@ -2,132 +2,136 @@
22
"name": "timeline-inline-allow-deny",
33
"versions": {
44
"2025-12-23": {
5-
"statements": {
6-
"net.concrnt.core.resolve": [
7-
{
8-
"emit": "deny",
9-
"condition": {
10-
"op": "And",
11-
"args": [
12-
{
13-
"op": "Load",
14-
"const": "params.readListMode"
15-
},
16-
{
17-
"op": "Contains",
18-
"args": [
19-
{
20-
"op": "Load",
21-
"const": "params.reader"
22-
},
23-
{
24-
"op": "Load",
25-
"const": "requester.ccid"
26-
}
27-
]
28-
}
29-
]
30-
}
31-
},
32-
{
33-
"emit": "allow",
34-
"condition": {
35-
"op": "And",
36-
"args": [
37-
{
38-
"op": "Not",
39-
"args": [
40-
{
41-
"op": "Load",
42-
"const": "params.readListMode"
43-
}
44-
]
45-
},
46-
{
47-
"op": "Not",
48-
"args": [
49-
{
50-
"op": "Contains",
51-
"args": [
52-
{
53-
"op": "Load",
54-
"const": "params.reader"
55-
},
56-
{
57-
"op": "Load",
58-
"const": "requester.ccid"
59-
}
60-
]
61-
}
62-
]
63-
}
64-
]
65-
}
5+
"statements": [
6+
{
7+
"action": "net.concrnt.core.resolve",
8+
"key": "./*",
9+
"emit": "deny",
10+
"condition": {
11+
"op": "And",
12+
"args": [
13+
{
14+
"op": "Load",
15+
"const": "params.readListMode"
16+
},
17+
{
18+
"op": "Contains",
19+
"args": [
20+
{
21+
"op": "Load",
22+
"const": "params.reader"
23+
},
24+
{
25+
"op": "Load",
26+
"const": "requester.ccid"
27+
}
28+
]
29+
}
30+
]
6631
}
67-
],
68-
"net.concrnt.core.commit.create": [
69-
{
70-
"emit": "deny",
71-
"condition": {
72-
"op": "And",
73-
"args": [
74-
{
75-
"op": "Load",
76-
"const": "params.writeListMode"
77-
},
78-
{
79-
"op": "Contains",
80-
"args": [
81-
{
82-
"op": "Load",
83-
"const": "params.writer"
84-
},
85-
{
86-
"op": "Load",
87-
"const": "requester.ccid"
88-
}
89-
]
90-
}
91-
]
92-
}
93-
},
94-
{
95-
"emit": "allow",
96-
"condition": {
97-
"op": "And",
98-
"args": [
99-
{
100-
"op": "Not",
101-
"args": [
102-
{
103-
"op": "Load",
104-
"const": "params.writeListMode"
105-
}
106-
]
107-
},
108-
{
109-
"op": "Not",
110-
"args": [
111-
{
112-
"op": "Contains",
113-
"args": [
114-
{
115-
"op": "Load",
116-
"const": "params.writer"
117-
},
118-
{
119-
"op": "Load",
120-
"const": "requester.ccid"
121-
}
122-
]
123-
}
124-
]
125-
}
126-
]
127-
}
32+
},
33+
{
34+
"action": "net.concrnt.core.resolve",
35+
"key": "./*",
36+
"emit": "allow",
37+
"condition": {
38+
"op": "And",
39+
"args": [
40+
{
41+
"op": "Not",
42+
"args": [
43+
{
44+
"op": "Load",
45+
"const": "params.readListMode"
46+
}
47+
]
48+
},
49+
{
50+
"op": "Not",
51+
"args": [
52+
{
53+
"op": "Contains",
54+
"args": [
55+
{
56+
"op": "Load",
57+
"const": "params.reader"
58+
},
59+
{
60+
"op": "Load",
61+
"const": "requester.ccid"
62+
}
63+
]
64+
}
65+
]
66+
}
67+
]
12868
}
129-
]
130-
},
69+
},
70+
{
71+
"action": "net.concrnt.core.commit.create",
72+
"key": "./*",
73+
"emit": "deny",
74+
"condition": {
75+
"op": "And",
76+
"args": [
77+
{
78+
"op": "Load",
79+
"const": "params.writeListMode"
80+
},
81+
{
82+
"op": "Contains",
83+
"args": [
84+
{
85+
"op": "Load",
86+
"const": "params.writer"
87+
},
88+
{
89+
"op": "Load",
90+
"const": "requester.ccid"
91+
}
92+
]
93+
}
94+
]
95+
}
96+
},
97+
{
98+
"action": "net.concrnt.core.commit.create",
99+
"key": "./*",
100+
"emit": "allow",
101+
"condition": {
102+
"op": "And",
103+
"args": [
104+
{
105+
"op": "Not",
106+
"args": [
107+
{
108+
"op": "Load",
109+
"const": "params.writeListMode"
110+
}
111+
]
112+
},
113+
{
114+
"op": "Not",
115+
"args": [
116+
{
117+
"op": "Contains",
118+
"args": [
119+
{
120+
"op": "Load",
121+
"const": "params.writer"
122+
},
123+
{
124+
"op": "Load",
125+
"const": "requester.ccid"
126+
}
127+
]
128+
}
129+
]
130+
}
131+
]
132+
}
133+
}
134+
],
131135
"paramSchema": {
132136
"type": "object",
133137
"properties": {

t/inline-read-write.json

Lines changed: 62 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -2,70 +2,70 @@
22
"name": "timeline-inline-read-write",
33
"versions": {
44
"2025-12-23": {
5-
"statements": {
6-
"net.concrnt.core.resolve": [
7-
{
8-
"emit": "deny",
9-
"condition": {
10-
"op": "And",
11-
"args": [
12-
{
13-
"op": "Not",
14-
"args": [{
15-
"op": "Load",
16-
"const": "params.isReadPublic"
17-
}]
18-
},
19-
{
20-
"op": "Not",
21-
"args": [
22-
{
23-
"op": "Contains",
24-
"args": [
25-
{
26-
"op": "Load",
27-
"const": "params.reader"
28-
},
29-
{
30-
"op": "Load",
31-
"const": "requester.ccid"
32-
}
33-
]
34-
}
35-
]
36-
}
37-
]
38-
}
39-
}
40-
],
41-
"net.concrnt.core.commit.create": [
42-
{
43-
"emit": "allow",
44-
"condition": {
45-
"op": "Or",
46-
"args": [
47-
{
5+
"statements": [
6+
{
7+
"action": "net.concrnt.core.resolve",
8+
"key": "./*",
9+
"emit": "deny",
10+
"condition": {
11+
"op": "And",
12+
"args": [
13+
{
14+
"op": "Not",
15+
"args": [{
4816
"op": "Load",
49-
"const": "params.isWritePublic"
50-
},
51-
{
52-
"op": "Contains",
53-
"args": [
54-
{
55-
"op": "Load",
56-
"const": "params.writer"
57-
},
58-
{
59-
"op": "Load",
60-
"const": "requester.ccid"
61-
}
62-
]
63-
}
64-
]
65-
}
17+
"const": "params.isReadPublic"
18+
}]
19+
},
20+
{
21+
"op": "Not",
22+
"args": [
23+
{
24+
"op": "Contains",
25+
"args": [
26+
{
27+
"op": "Load",
28+
"const": "params.reader"
29+
},
30+
{
31+
"op": "Load",
32+
"const": "requester.ccid"
33+
}
34+
]
35+
}
36+
]
37+
}
38+
]
6639
}
67-
]
68-
},
40+
},
41+
{
42+
"action": "net.concrnt.core.commit.create",
43+
"key": "./*",
44+
"emit": "allow",
45+
"condition": {
46+
"op": "Or",
47+
"args": [
48+
{
49+
"op": "Load",
50+
"const": "params.isWritePublic"
51+
},
52+
{
53+
"op": "Contains",
54+
"args": [
55+
{
56+
"op": "Load",
57+
"const": "params.writer"
58+
},
59+
{
60+
"op": "Load",
61+
"const": "requester.ccid"
62+
}
63+
]
64+
}
65+
]
66+
}
67+
}
68+
],
6969
"paramSchema": {
7070
"type": "object",
7171
"properties": {

0 commit comments

Comments
 (0)