Skip to content

Commit

Permalink
Disabling more syncing
Browse files Browse the repository at this point in the history
  • Loading branch information
augustuswm committed Apr 22, 2024
1 parent 3880301 commit 90f90f5
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
24 changes: 13 additions & 11 deletions cio/src/configs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2420,19 +2420,21 @@ pub async fn sync_groups(db: &Database, groups: BTreeMap<String, GroupConfig>, c
// Iterate over all the groups in our database.
// TODO: delete any groups that are not in the database for each vendor.
for g in db_groups {
if g.supports_provisioning_in(&ExternalServices::GitHub) {
github.ensure_group(db, company, &g).await?;
}
// No more group syncing

if g.supports_provisioning_in(&ExternalServices::Google) {
gsuite.ensure_group(db, company, &g).await?;
}
// if g.supports_provisioning_in(&ExternalServices::GitHub) {
// github.ensure_group(db, company, &g).await?;
// }

if let Some(ref okta) = okta_auth {
if g.supports_provisioning_in(&ExternalServices::Okta) {
okta.ensure_group(db, company, &g).await?;
}
}
// if g.supports_provisioning_in(&ExternalServices::Google) {
// gsuite.ensure_group(db, company, &g).await?;
// }

// if let Some(ref okta) = okta_auth {
// if g.supports_provisioning_in(&ExternalServices::Okta) {
// okta.ensure_group(db, company, &g).await?;
// }
// }
}

// Update groups in airtable.
Expand Down
6 changes: 4 additions & 2 deletions cio/src/providers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,8 @@ impl ProviderWriteOps for gsuite_api::Client {
// 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?;
// No longer doing group syncing
// crate::gsuite::update_user_google_groups(self, user, company).await?;

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

Expand Down Expand Up @@ -623,7 +624,8 @@ impl ProviderWriteOps for gsuite_api::Client {

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

crate::gsuite::update_user_google_groups(self, user, company).await?;
// No longer doing group syncing
// crate::gsuite::update_user_google_groups(self, user, company).await?;

info!("created user `{}` in GSuite", user.email);

Expand Down

0 comments on commit 90f90f5

Please sign in to comment.