@@ -5,7 +5,8 @@ import rego.v1
55test_admin_access_to_slash if {
66 allow with input as {
77 " callerUgi" : {
8- " shortUserName" : " admin"
8+ " shortUserName" : " admin" ,
9+ " userName" :
" admin/[email protected] " ,
910 },
1011 " path" : " /top-level" ,
1112 " operationName" : " setErasureCodingPolicy" ,
@@ -15,7 +16,8 @@ test_admin_access_to_slash if {
1516test_admin_access_to_alice if {
1617 allow with input as {
1718 " callerUgi" : {
18- " shortUserName" : " admin"
19+ " shortUserName" : " admin" ,
20+ " userName" :
" admin/[email protected] " ,
1921 },
2022 " path" : " /alice/file" ,
2123 " operationName" : " create" ,
@@ -26,7 +28,8 @@ test_admin_access_to_alice if {
2628test_admin_access_to_alice_nested_file if {
2729 allow with input as {
2830 " callerUgi" : {
29- " shortUserName" : " admin"
31+ " shortUserName" : " admin" ,
32+ " userName" :
" admin/[email protected] " ,
3033 },
3134 " path" : " /alice/nested/file" ,
3235 " operationName" : " create" ,
@@ -36,7 +39,8 @@ test_admin_access_to_alice_nested_file if {
3639test_admin_access_to_developers if {
3740 allow with input as {
3841 " callerUgi" : {
39- " shortUserName" : " admin"
42+ " shortUserName" : " admin" ,
43+ " userName" :
" admin/[email protected] " ,
4044 },
4145 " path" : " /developers/file" ,
4246 " operationName" : " create" ,
@@ -48,7 +52,8 @@ test_admin_access_to_developers if {
4852test_alice_access_to_alice_folder if {
4953 allow with input as {
5054 " callerUgi" : {
51- " shortUserName" : " alice"
55+ " shortUserName" : " alice" ,
56+ " userName" :
" alice/[email protected] " ,
5257 },
5358 " path" : " /alice" ,
5459 " operationName" : " create" ,
@@ -58,7 +63,8 @@ test_alice_access_to_alice_folder if {
5863test_alice_access_to_alice if {
5964 allow with input as {
6065 " callerUgi" : {
61- " shortUserName" : " alice"
66+ " shortUserName" : " alice" ,
67+ " userName" :
" alice/[email protected] " ,
6268 },
6369 " path" : " /alice/file" ,
6470 " operationName" : " create" ,
@@ -68,7 +74,8 @@ test_alice_access_to_alice if {
6874test_alice_no_access_to_bob if {
6975 not allow with input as {
7076 " callerUgi" : {
71- " shortUserName" : " alice"
77+ " shortUserName" : " alice" ,
78+ " userName" :
" alice/[email protected] " ,
7279 },
7380 " path" : " /bob/file" ,
7481 " operationName" : " open" ,
@@ -78,7 +85,8 @@ test_alice_no_access_to_bob if {
7885test_alice_access_to_developers if {
7986 allow with input as {
8087 " callerUgi" : {
81- " shortUserName" : " alice"
88+ " shortUserName" : " alice" ,
89+ " userName" :
" alice/[email protected] " ,
8290 },
8391 " path" : " /developers/file" ,
8492 " operationName" : " create" ,
@@ -92,7 +100,8 @@ test_alice_access_to_developers if {
92100test_bob_no_access_to_alice if {
93101 not allow with input as {
94102 " callerUgi" : {
95- " shortUserName" : " bob"
103+ " shortUserName" : " bob" ,
104+ " userName" :
" bob/[email protected] " ,
96105 },
97106 " path" : " /alice/file" ,
98107 " operationName" : " open" ,
@@ -102,7 +111,8 @@ test_bob_no_access_to_alice if {
102111test_bob_access_to_bob if {
103112 allow with input as {
104113 " callerUgi" : {
105- " shortUserName" : " bob"
114+ " shortUserName" : " bob" ,
115+ " userName" :
" bob/[email protected] " ,
106116 },
107117 " path" : " /bob/file" ,
108118 " operationName" : " create" ,
@@ -112,7 +122,8 @@ test_bob_access_to_bob if {
112122test_bob_ro_access_to_developers if {
113123 allow with input as {
114124 " callerUgi" : {
115- " shortUserName" : " bob"
125+ " shortUserName" : " bob" ,
126+ " userName" :
" bob/[email protected] " ,
116127 },
117128 " path" : " /developers/file" ,
118129 " operationName" : " open" ,
@@ -122,7 +133,8 @@ test_bob_ro_access_to_developers if {
122133test_bob_no_rw_access_to_developers if {
123134 not allow with input as {
124135 " callerUgi" : {
125- " shortUserName" : " bob"
136+ " shortUserName" : " bob" ,
137+ " userName" :
" bob/[email protected] " ,
126138 },
127139 " path" : " /developers/file" ,
128140 " operationName" : " create" ,
@@ -132,7 +144,8 @@ test_bob_no_rw_access_to_developers if {
132144test_bob_rw_access_to_developers_special_file if {
133145 allow with input as {
134146 " callerUgi" : {
135- " shortUserName" : " bob"
147+ " shortUserName" : " bob" ,
148+ " userName" :
" bob/[email protected] " ,
136149 },
137150 " path" : " /developers/file-from-bob" ,
138151 " operationName" : " create" ,
0 commit comments