11cb0ef41Sopenharmony_ci#include "child_process_permission.h" 21cb0ef41Sopenharmony_ci 31cb0ef41Sopenharmony_ci#include <string> 41cb0ef41Sopenharmony_ci#include <vector> 51cb0ef41Sopenharmony_ci 61cb0ef41Sopenharmony_cinamespace node { 71cb0ef41Sopenharmony_ci 81cb0ef41Sopenharmony_cinamespace permission { 91cb0ef41Sopenharmony_ci 101cb0ef41Sopenharmony_ci// Currently, ChildProcess manage a single state 111cb0ef41Sopenharmony_ci// Once denied, it's always denied 121cb0ef41Sopenharmony_civoid ChildProcessPermission::Apply(const std::string& allow, 131cb0ef41Sopenharmony_ci PermissionScope scope) { 141cb0ef41Sopenharmony_ci deny_all_ = true; 151cb0ef41Sopenharmony_ci} 161cb0ef41Sopenharmony_ci 171cb0ef41Sopenharmony_cibool ChildProcessPermission::is_granted(PermissionScope perm, 181cb0ef41Sopenharmony_ci const std::string_view& param) { 191cb0ef41Sopenharmony_ci return deny_all_ == false; 201cb0ef41Sopenharmony_ci} 211cb0ef41Sopenharmony_ci 221cb0ef41Sopenharmony_ci} // namespace permission 231cb0ef41Sopenharmony_ci} // namespace node 24