feat: new users will immediately gain access to most services
Closes #13
This commit is contained in:
parent
56b2da1ae6
commit
38cbb440af
3 changed files with 51 additions and 45 deletions
|
@ -235,6 +235,7 @@ pub mod post {
|
|||
|
||||
pub mod account {
|
||||
use super::*;
|
||||
use crate::update_group;
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
struct LdapNewUser {
|
||||
|
@ -411,6 +412,11 @@ pub mod post {
|
|||
|
||||
ldap.extended(tmp).unwrap();
|
||||
|
||||
// user is already verified by being an active member on wolves
|
||||
if let Err(e) = update_group(config, "skynet-users", &vec![username.to_string()], true).await {
|
||||
println!("Couldnt add {} to skynet-users: {:?}", username, e)
|
||||
}
|
||||
|
||||
ldap.unbind()?;
|
||||
|
||||
Ok(())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue