File tree Expand file tree Collapse file tree 4 files changed +9
-4
lines changed Expand file tree Collapse file tree 4 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 1
1
source common.sh
2
2
3
+ USER=$( whoami)
4
+
5
+ setfacl -m " u:$USER :r" example || skipTest " ACLs not supported"
6
+
3
7
# Adds the "dummy" file to the nix store and check that we can access it
4
8
EXAMPLE_PATH=$( nix store add-path dummy)
5
9
nix store access info " $EXAMPLE_PATH " --json | grep ' "protected":false'
@@ -12,8 +16,6 @@ nix store access protect "$EXAMPLE_PATH"
12
16
nix store access info " $EXAMPLE_PATH " --json | grep ' "protected":true'
13
17
nix store access info " $EXAMPLE_PATH " --json | grep ' "users":\[\]'
14
18
15
- USER=$( whoami)
16
-
17
19
# Grant permission and check that we can access the file
18
20
nix store access grant " $EXAMPLE_PATH " --user " $USER "
19
21
cat " $EXAMPLE_PATH "
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ cat > "$NIX_CONF_DIR"/nix.conf <<EOF
20
20
build-users-group =
21
21
keep-derivations = false
22
22
sandbox = false
23
- experimental-features = nix-command flakes
23
+ experimental-features = nix-command flakes acls
24
24
gc-reserved-space = 0
25
25
substituters =
26
26
flake-registry = $TEST_ROOT /registry.json
Original file line number Diff line number Diff line change @@ -137,7 +137,8 @@ nix_tests = \
137
137
path-from-hash-part.sh \
138
138
test-libstoreconsumer.sh \
139
139
toString-path.sh \
140
- read-only-store.sh
140
+ read-only-store.sh \
141
+ acls.sh
141
142
142
143
acls_test = \
143
144
acls.sh \
Original file line number Diff line number Diff line change 35
35
permissions = {
36
36
protected = true;
37
37
users = ["root" "test"];
38
+ groups = ["root"];
38
39
};
39
40
};
40
41
buildCommand = "echo Example > $out; cat $exampleSource >> $out";
60
61
permissions = {
61
62
protected = true;
62
63
users = ["root" "test"];
64
+ groups = ["root"];
63
65
};
64
66
};
65
67
buildCommand = "echo Example > $out; cat $exampleSource >> $out";
You can’t perform that action at this time.
0 commit comments