/src/node/src/permission/worker_permission.cc
Line | Count | Source (jump to first uncovered line) |
1 | | #include "permission/worker_permission.h" |
2 | | |
3 | | #include <string> |
4 | | #include <vector> |
5 | | |
6 | | namespace node { |
7 | | |
8 | | namespace permission { |
9 | | |
10 | | // Currently, PolicyDenyWorker manage a single state |
11 | | // Once denied, it's always denied |
12 | | void WorkerPermission::Apply(Environment* env, |
13 | | const std::vector<std::string>& allow, |
14 | 0 | PermissionScope scope) { |
15 | 0 | deny_all_ = true; |
16 | 0 | } |
17 | | |
18 | | bool WorkerPermission::is_granted(PermissionScope perm, |
19 | 0 | const std::string_view& param) const { |
20 | 0 | return deny_all_ == false; |
21 | 0 | } |
22 | | |
23 | | } // namespace permission |
24 | | } // namespace node |