-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
Expand file tree
/
Copy pathchild_process_permission.cc
More file actions
31 lines (24 loc) · 890 Bytes
/
child_process_permission.cc
File metadata and controls
31 lines (24 loc) · 890 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include "child_process_permission.h"
#include <string>
#include <vector>
namespace node {
namespace permission {
// Currently, ChildProcess manage a single state
// Once denied, it's always denied
void ChildProcessPermission::Apply(Environment* env,
const std::vector<std::string>& allow,
PermissionScope scope) {
deny_all_ = true;
}
void ChildProcessPermission::Drop(Environment* env,
PermissionScope scope,
const std::string_view& param) {
deny_all_ = true;
}
bool ChildProcessPermission::is_granted(Environment* env,
PermissionScope perm,
const std::string_view& param) const {
return deny_all_ == false;
}
} // namespace permission
} // namespace node