reorganise 3

master
Avril 4 years ago
parent 2738e465ba
commit 44269293dc
Signed by: flanchan
GPG Key ID: 284488987C31F630

@ -1,6 +1,30 @@
//! Global config stuff //! Global config
use super::*; use super::*;
/// 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,
}
/// Global user config /// Global user config
#[derive(Debug)] #[derive(Debug)]
pub struct Config pub struct Config

@ -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";

Loading…
Cancel
Save