mirror of
https://gitlab.com/fabinfra/fabaccess/bffh.git
synced 2024-11-22 14:57:56 +01:00
Implement wiki and URN links
This commit is contained in:
parent
4d2b0ea29c
commit
7bcb0712ae
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -515,7 +515,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "diflouroborane"
|
name = "diflouroborane"
|
||||||
version = "0.2.0"
|
version = "0.3.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-channel",
|
"async-channel",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
|
@ -148,6 +148,10 @@ impl machines::Server for Machines {
|
|||||||
if let Some(ref desc) = machine.desc.description {
|
if let Some(ref desc) = machine.desc.description {
|
||||||
builder.set_description(desc);
|
builder.set_description(desc);
|
||||||
}
|
}
|
||||||
|
if let Some(ref wiki) = machine.desc.wiki {
|
||||||
|
builder.set_wiki(wiki);
|
||||||
|
}
|
||||||
|
builder.set_urn(&format!("urn:fabaccess:resource:{}", &name));
|
||||||
|
|
||||||
let machineapi = Machine::new(user.clone(), perms, machine.clone());
|
let machineapi = Machine::new(user.clone(), perms, machine.clone());
|
||||||
let state = machine.get_status().await;
|
let state = machine.get_status().await;
|
||||||
|
@ -80,6 +80,7 @@ impl Default for Config {
|
|||||||
machines.insert("Testmachine".to_string(), MachineDescription {
|
machines.insert("Testmachine".to_string(), MachineDescription {
|
||||||
name: "Testmachine".to_string(),
|
name: "Testmachine".to_string(),
|
||||||
description: Some("A test machine".to_string()),
|
description: Some("A test machine".to_string()),
|
||||||
|
wiki: None,
|
||||||
privs: PrivilegesBuf {
|
privs: PrivilegesBuf {
|
||||||
disclose: PermissionBuf::from_string("lab.test.read".to_string()),
|
disclose: PermissionBuf::from_string("lab.test.read".to_string()),
|
||||||
read: PermissionBuf::from_string("lab.test.read".to_string()),
|
read: PermissionBuf::from_string("lab.test.read".to_string()),
|
||||||
|
@ -65,7 +65,7 @@ pub struct Machine {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Machine {
|
impl Machine {
|
||||||
pub fn new(inner: Inner, desc: MachineDescription, ) -> Self {
|
pub fn new(inner: Inner, desc: MachineDescription) -> Self {
|
||||||
Self {
|
Self {
|
||||||
id: uuid::Uuid::default(),
|
id: uuid::Uuid::default(),
|
||||||
inner: Arc::new(Mutex::new(inner)),
|
inner: Arc::new(Mutex::new(inner)),
|
||||||
@ -226,6 +226,10 @@ pub struct MachineDescription {
|
|||||||
/// An optional description of the Machine.
|
/// An optional description of the Machine.
|
||||||
pub description: Option<String>,
|
pub description: Option<String>,
|
||||||
|
|
||||||
|
#[serde(default)]
|
||||||
|
#[serde(flatten)]
|
||||||
|
pub wiki: Option<String>,
|
||||||
|
|
||||||
/// The permission required
|
/// The permission required
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
pub privs: access::PrivilegesBuf,
|
pub privs: access::PrivilegesBuf,
|
||||||
|
Loading…
Reference in New Issue
Block a user