Organize device inventory by customer and restrict token access to its audience
This commit is contained in:
@@ -54,6 +54,10 @@ impl UpdateArtifacts {
|
||||
profile == "development",
|
||||
"update object adapter is development-only"
|
||||
);
|
||||
Self::private_directory(root, owner)
|
||||
}
|
||||
|
||||
pub(crate) fn private_directory(root: PathBuf, owner: u32) -> Result<Self> {
|
||||
match fs::create_dir(&root) {
|
||||
Ok(()) => fs::set_permissions(&root, fs::Permissions::from_mode(0o700))?,
|
||||
Err(e) if e.kind() == std::io::ErrorKind::AlreadyExists => {}
|
||||
|
||||
Reference in New Issue
Block a user