|
|
@ -40,30 +40,5 @@ pub struct Job
|
|
|
|
what: Command,
|
|
|
|
what: Command,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Global config
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// Type of access
|
|
|
|
|
|
|
|
#[derive(Debug, PartialEq,Eq,Hash)]
|
|
|
|
|
|
|
|
pub enum Access
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Allow,
|
|
|
|
|
|
|
|
Deny,
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// A permission entry for users
|
|
|
|
|
|
|
|
#[derive(Debug,PartialEq,Eq,Hash)]
|
|
|
|
|
|
|
|
pub enum UserPermAlias {
|
|
|
|
|
|
|
|
Single(String),
|
|
|
|
|
|
|
|
Group(String),
|
|
|
|
|
|
|
|
All,
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// Access rule for user
|
|
|
|
|
|
|
|
#[derive(Debug, PartialEq,Eq,Hash)]
|
|
|
|
|
|
|
|
pub struct UserRule
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
user: UserPermAlias,
|
|
|
|
|
|
|
|
mode: Access,
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const DEFAULT_JOB_DIR: &str = "/etc/rori.kron";
|
|
|
|
const DEFAULT_JOB_DIR: &str = "/etc/rori.kron";
|
|
|
|