-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
Expand file tree
/
Copy pathnet_permission.cc
More file actions
29 lines (22 loc) · 712 Bytes
/
net_permission.cc
File metadata and controls
29 lines (22 loc) · 712 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
#include "net_permission.h"
#include <iostream>
#include <string>
namespace node {
namespace permission {
void NetPermission::Apply(Environment* env,
const std::vector<std::string>& allow,
PermissionScope scope) {
allow_net_ = true;
}
void NetPermission::Drop(Environment* env,
PermissionScope scope,
const std::string_view& param) {
allow_net_ = false;
}
bool NetPermission::is_granted(Environment* env,
PermissionScope perm,
const std::string_view& param) const {
return allow_net_;
}
} // namespace permission
} // namespace node