From aa5ba883409e6f07793463bd6ab75afafb1e6531 Mon Sep 17 00:00:00 2001 From: David Pacheco Date: Fri, 21 Jan 2022 13:12:57 -0800 Subject: [PATCH] authz fixups from 592 --- nexus/src/db/datastore.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nexus/src/db/datastore.rs b/nexus/src/db/datastore.rs index a5f00d33677..258cd6a64b6 100644 --- a/nexus/src/db/datastore.rs +++ b/nexus/src/db/datastore.rs @@ -274,7 +274,7 @@ impl DataStore { /// for example. /// * If a code path is only doing this lookup to get the id so that it can /// look up something else inside the Organization, then the database - /// record is not record -- and neither is an authz check on the + /// record is not required -- and neither is an authz check on the /// Organization. Callers usually use `organization_lookup_id()` for /// this. That function does not expose the database row to the caller. /// @@ -475,7 +475,7 @@ impl DataStore { ) -> UpdateResult { use db::schema::organization::dsl; - let (authz_org, _) = self.organization_lookup_noauthz(name).await?; + let authz_org = self.organization_lookup_id(name).await?; opctx.authorize(authz::Action::Modify, &authz_org).await?; diesel::update(dsl::organization)