xref: /third_party/node/src/permission/worker_permission.cc
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/node/src/permission/
11cb0ef41Sopenharmony_ci#include "permission/worker_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, PolicyDenyWorker manage a single state
111cb0ef41Sopenharmony_ci// Once denied, it's always denied
121cb0ef41Sopenharmony_civoid WorkerPermission::Apply(const std::string& allow, PermissionScope scope) {
131cb0ef41Sopenharmony_ci  deny_all_ = true;
141cb0ef41Sopenharmony_ci}
151cb0ef41Sopenharmony_ci
161cb0ef41Sopenharmony_cibool WorkerPermission::is_granted(PermissionScope perm,
171cb0ef41Sopenharmony_ci                                  const std::string_view& param) {
181cb0ef41Sopenharmony_ci  return deny_all_ == false;
191cb0ef41Sopenharmony_ci}
201cb0ef41Sopenharmony_ci
211cb0ef41Sopenharmony_ci}  // namespace permission
221cb0ef41Sopenharmony_ci}  // namespace node
23

Indexes created Thu Nov 07 10:32:03 CST 2024