Update
This commit is contained in:
parent
a4ae7531a3
commit
73b2184d24
8 changed files with 108 additions and 36 deletions
|
|
@ -4,6 +4,7 @@ use std::fmt;
|
|||
use std::io::Error as IoError;
|
||||
|
||||
use command_runner::CommandRunner;
|
||||
use resources::Resource;
|
||||
use symbols::Symbol;
|
||||
|
||||
#[derive(Debug, PartialEq)]
|
||||
|
|
@ -108,6 +109,10 @@ impl<'a, E: 'static + Error, A: UserAdder<SubE=E>> Symbol for User<'a, E, A> {
|
|||
fn execute(&self) -> Result<(), Box<Error>> {
|
||||
self.user_adder.add_user(&*self.user_name).map_err(|e| Box::new(e) as Box<Error>)
|
||||
}
|
||||
|
||||
fn provides(&self) -> Option<Vec<Resource>> {
|
||||
Some(vec![Resource::new("user", self.user_name.to_string())])
|
||||
}
|
||||
}
|
||||
|
||||
pub struct SystemUserAdder<'a> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue