1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-03 04:48:52 -05:00

refactor: remove unused AllowAllNodePermissions (#25159)

This commit is contained in:
David Sherret 2024-08-22 14:54:03 -04:00 committed by GitHub
parent 641b52bac7
commit ef1294e4e5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -66,39 +66,6 @@ pub trait NodePermissions {
) -> Result<(), AnyError>;
}
pub struct AllowAllNodePermissions;
impl NodePermissions for AllowAllNodePermissions {
fn check_net_url(
&mut self,
_url: &Url,
_api_name: &str,
) -> Result<(), AnyError> {
Ok(())
}
fn check_read_with_api_name(
&mut self,
_path: &Path,
_api_name: Option<&str>,
) -> Result<(), AnyError> {
Ok(())
}
fn check_write_with_api_name(
&mut self,
_path: &Path,
_api_name: Option<&str>,
) -> Result<(), AnyError> {
Ok(())
}
fn check_sys(
&mut self,
_kind: &str,
_api_name: &str,
) -> Result<(), AnyError> {
Ok(())
}
}
impl NodePermissions for deno_permissions::PermissionsContainer {
#[inline(always)]
fn check_net_url(