Watch
0
0
Fork
You've already forked hyperhive
0

move Permission into hive-types, drop swarm-controller's hive-sh4re dep

This commit is contained in:
atlas 2026-10-18 10:14:30 +02:00
commit e4a9005468
27 changed files with 221 additions and 175 deletions

View file

@ -13,7 +13,7 @@ use std::collections::{BTreeMap, BTreeSet};
use std::path::{Path, PathBuf};
use anyhow::{Context, Result};
use hive_sh4re::permissions::Permission;
use hive_types::Permission;
use swarm_queue_client::agent_permissions::{
self, AgentPermissions, IMPORT_REPLY_DEADLINE, Import, ImportReply,
};
@ -240,7 +240,7 @@ async fn send_at(client: &async_nats::Client, hive: &str, meta: &Path) -> Result
#[cfg(test)]
mod tests {
use super::{FileMap, grants, seed_local_at};
use hive_sh4re::permissions::Permission::{self, *};
use hive_types::Permission::{self, *};
fn file(json: &str) -> FileMap {
serde_json::from_str(json).expect("decodes")

View file

@ -18,7 +18,7 @@ use std::sync::Arc;
use std::time::Duration;
use anyhow::{Context, Result};
use hive_sh4re::permissions::Permission;
use hive_types::Permission;
use swarm_queue_client::agent_permissions::{self, AgentPermissions, Read};
use crate::coordinator::Coordinator;
@ -216,12 +216,8 @@ mod tests {
assert!(changed.is_empty());
assert!(crate::permissions::read_at(&path).expect("read").is_empty());
assert!(
!crate::permissions::holds(
&path,
"ruth",
hive_sh4re::permissions::Permission::ManageRootAgent
)
.expect("read")
!crate::permissions::holds(&path, "ruth", hive_types::Permission::ManageRootAgent)
.expect("read")
);
}