We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a60aa72 commit 428d24aCopy full SHA for 428d24a
2 files changed
src/permission/fs_permission.cc
@@ -176,13 +176,17 @@ bool FSPermission::is_granted(Environment* env,
176
case PermissionScope::kFileSystem:
177
return allow_all_in_ && allow_all_out_;
178
case PermissionScope::kFileSystemRead:
179
+ if (param.empty()) {
180
+ return allow_all_in_;
181
+ }
182
return !deny_all_in_ &&
- ((param.empty() && allow_all_in_) || allow_all_in_ ||
- is_tree_granted(env, &granted_in_fs_, param));
183
+ (allow_all_in_ || is_tree_granted(env, &granted_in_fs_, param));
184
case PermissionScope::kFileSystemWrite:
185
186
+ return allow_all_out_;
187
188
return !deny_all_out_ &&
- ((param.empty() && allow_all_out_) || allow_all_out_ ||
- is_tree_granted(env, &granted_out_fs_, param));
189
+ (allow_all_out_ || is_tree_granted(env, &granted_out_fs_, param));
190
default:
191
return false;
192
}
test/parallel/test-permission-has.js
@@ -1,4 +1,4 @@
1
-// Flags: --permission --allow-fs-read=*
+// Flags: --permission --allow-fs-read=* --allow-fs-write=.
2
'use strict';
3
4
const common = require('../common');
0 commit comments