Skip to content

Commit

Permalink
review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
davepacheco committed May 12, 2023
1 parent b96c347 commit af6d6d5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
12 changes: 1 addition & 11 deletions nexus/db-queries/src/authz/omicron.polar
Original file line number Diff line number Diff line change
Expand Up @@ -205,23 +205,14 @@ has_relation(silo: Silo, "parent_silo", project: Project)
#

resource Certificate {
permissions = [
"read",
"modify",
"create_child",
"list_children",
];
permissions = [ "read", "modify" ];
relations = { parent_silo: Silo, parent_fleet: Fleet };

# Fleet-level and silo-level roles both grant privileges on certificates.
"read" if "admin" on "parent_silo";
"modify" if "admin" on "parent_silo";
"create_child" if "admin" on "parent_silo";
"list_children" if "admin" on "parent_silo";
"read" if "admin" on "parent_fleet";
"modify" if "admin" on "parent_fleet";
"create_child" if "admin" on "parent_fleet";
"list_children" if "admin" on "parent_fleet";
}
has_relation(silo: Silo, "parent_silo", certificate: Certificate)
if certificate.silo = silo;
Expand Down Expand Up @@ -420,7 +411,6 @@ resource SiloCertificateList {
# Both Fleet and Silo administrators can see and modify the Silo's
# certificates.
"list_children" if "admin" on "parent_silo";
"list_children" if "admin" on "parent_silo";
"list_children" if "admin" on "parent_fleet";
"create_child" if "admin" on "parent_silo";
"create_child" if "admin" on "parent_fleet";
Expand Down
2 changes: 0 additions & 2 deletions nexus/db-queries/src/db/datastore/rack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,6 @@ impl DataStore {
use db::schema::certificate::dsl;
diesel::insert_into(dsl::certificate)
.values(certificates)
.on_conflict(dsl::id)
.do_nothing()
.execute_async(&conn)
.await?;
}
Expand Down

0 comments on commit af6d6d5

Please sign in to comment.