comment broken newuser
This commit is contained in:
		
							parent
							
								
									f33ba8e767
								
							
						
					
					
						commit
						932fb2827d
					
				
							
								
								
									
										24
									
								
								src/api.rs
									
									
									
									
									
								
							
							
						
						
									
										24
									
								
								src/api.rs
									
									
									
									
									
								
							@ -17,18 +17,18 @@ pub trait UserDBValidation {
 | 
				
			|||||||
pub trait UserDBWrite {
 | 
					pub trait UserDBWrite {
 | 
				
			||||||
    fn delete_user(&mut self, user: &str) -> Result<crate::User, crate::UserLibError>;
 | 
					    fn delete_user(&mut self, user: &str) -> Result<crate::User, crate::UserLibError>;
 | 
				
			||||||
    fn new_user(
 | 
					    fn new_user(
 | 
				
			||||||
        &mut self,
 | 
					        &mut self, /*
 | 
				
			||||||
        username: String,
 | 
					                   username: String,
 | 
				
			||||||
        enc_password: String,
 | 
					                   enc_password: String,
 | 
				
			||||||
        uid: u32,
 | 
					                   uid: u32,
 | 
				
			||||||
        gid: u32,
 | 
					                   gid: u32,
 | 
				
			||||||
        full_name: String,
 | 
					                   full_name: String,
 | 
				
			||||||
        room: String,
 | 
					                   room: String,
 | 
				
			||||||
        phone_work: String,
 | 
					                   phone_work: String,
 | 
				
			||||||
        phone_home: String,
 | 
					                   phone_home: String,
 | 
				
			||||||
        other: Option<Vec<String>>,
 | 
					                   other: Option<Vec<String>>,
 | 
				
			||||||
        home_dir: String,
 | 
					                   home_dir: String,
 | 
				
			||||||
        shell_path: String,
 | 
					                   shell_path: String,*/
 | 
				
			||||||
    ) -> Result<&crate::User, crate::UserLibError>;
 | 
					    ) -> Result<&crate::User, crate::UserLibError>;
 | 
				
			||||||
    fn delete_group(&mut self, group: &crate::Group) -> Result<(), crate::UserLibError>;
 | 
					    fn delete_group(&mut self, group: &crate::Group) -> Result<(), crate::UserLibError>;
 | 
				
			||||||
    fn new_group(&mut self) -> Result<&crate::Group, crate::UserLibError>;
 | 
					    fn new_group(&mut self) -> Result<&crate::Group, crate::UserLibError>;
 | 
				
			||||||
 | 
				
			|||||||
@ -91,7 +91,7 @@ impl UserDBWrite for UserDBLocal {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    fn new_user(
 | 
					    fn new_user(
 | 
				
			||||||
        &mut self,
 | 
					        &mut self, /*
 | 
				
			||||||
        username: String,
 | 
					        username: String,
 | 
				
			||||||
        enc_password: String,
 | 
					        enc_password: String,
 | 
				
			||||||
        uid: u32,
 | 
					        uid: u32,
 | 
				
			||||||
@ -102,7 +102,7 @@ impl UserDBWrite for UserDBLocal {
 | 
				
			|||||||
        phone_home: String,
 | 
					        phone_home: String,
 | 
				
			||||||
        other: Option<Vec<String>>,
 | 
					        other: Option<Vec<String>>,
 | 
				
			||||||
        home_dir: String,
 | 
					        home_dir: String,
 | 
				
			||||||
        shell_path: String,
 | 
					                   shell_path: String,*/
 | 
				
			||||||
    ) -> Result<&crate::User, crate::UserLibError> {
 | 
					    ) -> Result<&crate::User, crate::UserLibError> {
 | 
				
			||||||
        /*if self.users.contains_key(&username) {
 | 
					        /*if self.users.contains_key(&username) {
 | 
				
			||||||
            Err(format!(
 | 
					            Err(format!(
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user