Skip to content

Commit 21c0e87

Browse files
authored
authz fixups from 592 (#616)
1 parent 8de0d68 commit 21c0e87

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

nexus/src/db/datastore.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ impl DataStore {
274274
/// for example.
275275
/// * If a code path is only doing this lookup to get the id so that it can
276276
/// look up something else inside the Organization, then the database
277-
/// record is not record -- and neither is an authz check on the
277+
/// record is not required -- and neither is an authz check on the
278278
/// Organization. Callers usually use `organization_lookup_id()` for
279279
/// this. That function does not expose the database row to the caller.
280280
///
@@ -475,7 +475,7 @@ impl DataStore {
475475
) -> UpdateResult<Organization> {
476476
use db::schema::organization::dsl;
477477

478-
let (authz_org, _) = self.organization_lookup_noauthz(name).await?;
478+
let authz_org = self.organization_lookup_id(name).await?;
479479
opctx.authorize(authz::Action::Modify, &authz_org).await?;
480480

481481
diesel::update(dsl::organization)

0 commit comments

Comments
 (0)