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

Do not update user gsuite data #371

Merged
merged 2 commits into from
Nov 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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