Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(runtime): Allow embedders to perform additional access checks on file open #23208

Merged
merged 6 commits into from
Apr 20, 2024

Conversation

mmastrac
Copy link
Contributor

@mmastrac mmastrac commented Apr 3, 2024

Embedders may have special requirements around file opening, so we add a new check_open permission check that is called as part of the file open process.

@mmastrac mmastrac force-pushed the combine_read_write branch 13 times, most recently from 5a0104d to 09b355e Compare April 5, 2024 16:26
@mmastrac mmastrac force-pushed the combine_read_write branch 2 times, most recently from d3cb8cf to dc74c8c Compare April 5, 2024 16:48
Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, reviewed offline with Matt. There's follow up work to be done, but this is more than good enough for a first pass.

Comment on lines +1658 to +1660
pub fn check_was_allow_all_flag_passed(&mut self) -> Result<(), AnyError> {
self.0.lock().all.check()
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be good to have a unit test for this one

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding this to a follow-up.

@mmastrac mmastrac merged commit 472a370 into denoland:main Apr 20, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants