Skip to content
This repository has been archived by the owner on Nov 8, 2024. It is now read-only.

Commit

Permalink
Do not update user gsuite data (#371)
Browse files Browse the repository at this point in the history
* Do not update user gsuite data

* Fix comment
  • Loading branch information
augustuswm authored Nov 3, 2023
1 parent 951bf8e commit 9224f59
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions cio/src/providers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -579,24 +579,24 @@ impl ProviderWriteOps for gsuite_api::Client {
{
Ok(u) => {
// Update the user with the settings from the config for the user.
let gsuite_user = crate::gsuite::update_gsuite_user(&u, user, false, company).await;
// let gsuite_user = crate::gsuite::update_gsuite_user(&u, user, false, company).await;

match self.users().update(&gsuite_user.id, &gsuite_user).await {
Ok(_) => {}
Err(e) => {
bail!("failed to update user `{}` in gsuite: {:?}\n", user.id, e);
}
};
// match self.users().update(&gsuite_user.id, &gsuite_user).await {
// Ok(_) => {}
// Err(e) => {
// bail!("failed to update user `{}` in gsuite: {:?}\n", user.id, e);
// }
// };

crate::gsuite::update_user_aliases(self, &gsuite_user, user.aliases.clone(), company).await?;
// crate::gsuite::update_user_aliases(self, &gsuite_user, user.aliases.clone(), company).await?;

// Add the user to their teams and groups.
crate::gsuite::update_user_google_groups(self, user, company).await?;

info!("updated user `{}` in GSuite", user.id);
// info!("updated user `{}` in GSuite", user.id);

// Return the ID.
return Ok(gsuite_user.id);
return Ok(u.id);
}
Err(e) => {
// If the error is Not Found we need to add them.
Expand Down

0 comments on commit 9224f59

Please sign in to comment.