Skip to content

Commit 3ece2e2

Browse files
committed
Merge branch 'feature/add-auth' into mail-service-update
2 parents f0964cd + 446e139 commit 3ece2e2

File tree

5 files changed

+73
-1
lines changed

5 files changed

+73
-1
lines changed

config/authorization/config.ex

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
alias Acl.Accessibility.Always, as: AlwaysAccessible
2+
alias Acl.Accessibility.ByQuery, as: AccessByQuery
3+
alias Acl.GraphSpec.Constraint.Resource.AllPredicates, as: AllPredicates
4+
alias Acl.GraphSpec.Constraint.Resource.NoPredicates, as: NoPredicates
5+
alias Acl.GraphSpec.Constraint.ResourceFormat, as: ResourceFormatConstraint
6+
alias Acl.GraphSpec.Constraint.Resource, as: ResourceConstraint
7+
alias Acl.GraphSpec, as: GraphSpec
8+
alias Acl.GroupSpec, as: GroupSpec
9+
alias Acl.GroupSpec.GraphCleanup, as: GraphCleanup
10+
11+
defmodule Acl.UserGroups.Config do
12+
def user_groups do
13+
[
14+
# PUBLIC
15+
%GroupSpec{
16+
name: "public",
17+
useage: [:read, :write, :read_for_write],
18+
access: %AlwaysAccessible{},
19+
graphs: [ %GraphSpec{
20+
graph: "http://mu.semte.ch/graphs/public",
21+
constraint: %ResourceConstraint{
22+
resource_types: [
23+
"http://xmlns.com/foaf/0.1/Person"
24+
],
25+
inverse_predicates: %AllPredicates{}
26+
} } ] },
27+
# CLEANUP
28+
#
29+
%GraphCleanup{
30+
originating_graph: "http://mu.semte.ch/application",
31+
useage: [:write],
32+
name: "clean"
33+
}
34+
]
35+
end
36+
end

config/authorization/delta.ex

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
defmodule Delta.Config do
2+
def targets do
3+
[ "http://delta-notifier" ]
4+
end
5+
end

config/delta/rules.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
export default [
2+
{
3+
match: {
4+
subject: { }
5+
},
6+
callback: {
7+
url: "http://resource/.mu/delta",
8+
method: "POST"
9+
},
10+
options: {
11+
resourceFormat: "v0.0.1",
12+
gracePeriod: 250,
13+
ignoreFromSelf: true
14+
}
15+
}
16+
];

docker-compose.dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ services:
44
identifier:
55
ports:
66
- "80:80"
7-
database:
7+
triplestore:
88
ports:
99
- "8890:8890"

docker-compose.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,21 @@ services:
1414
volumes:
1515
- ./config/dispatcher:/config
1616
database:
17+
image: semtech/mu-authorization:0.6.0-beta.8
18+
environment:
19+
MU_SPARQL_ENDPOINT: "http://triplestore:8890/sparql"
20+
ERROR_ON_UNWRITTEN_DATA: "true"
21+
volumes:
22+
- ./config/authorization:/config
23+
labels:
24+
- "logging=true"
25+
delta-notifier:
26+
image: semtech/mu-delta-notifier:0.1.0
27+
volumes:
28+
- ./config/delta:/config
29+
labels:
30+
- "logging=true"
31+
triplestore:
1732
image: redpencil/virtuoso:1.2.0-rc.1
1833
environment:
1934
SPARQL_UPDATE: "true"

0 commit comments

Comments
 (0)