@@ -6,8 +6,8 @@ use diesel::prelude::*;
66use nexus_db_errors:: ErrorHandler ;
77use nexus_db_errors:: public_error_from_diesel;
88use nexus_db_lookup:: DbConnection ;
9- use nexus_db_model:: SiloSettings ;
10- use nexus_db_model:: SiloSettingsUpdate ;
9+ use nexus_db_model:: SiloAuthSettings ;
10+ use nexus_db_model:: SiloAuthSettingsUpdate ;
1111use omicron_common:: api:: external:: DeleteResult ;
1212use omicron_common:: api:: external:: Error ;
1313use omicron_common:: api:: external:: ResourceType ;
@@ -27,7 +27,7 @@ impl DataStore {
2727 & self ,
2828 conn : & async_bb8_diesel:: Connection < DbConnection > ,
2929 authz_silo : & authz:: Silo ,
30- settings : SiloSettings ,
30+ settings : SiloAuthSettings ,
3131 ) -> Result < ( ) , Error > {
3232 let silo_id = authz_silo. id ( ) ;
3333 use nexus_db_schema:: schema:: silo_auth_settings;
@@ -40,7 +40,7 @@ impl DataStore {
4040 public_error_from_diesel (
4141 e,
4242 ErrorHandler :: Conflict (
43- ResourceType :: SiloSettings ,
43+ ResourceType :: SiloAuthSettings ,
4444 & silo_id. to_string ( ) ,
4545 ) ,
4646 )
@@ -72,22 +72,22 @@ impl DataStore {
7272 & self ,
7373 opctx : & OpContext ,
7474 authz_silo : & authz:: Silo ,
75- updates : SiloSettingsUpdate ,
76- ) -> UpdateResult < SiloSettings > {
75+ updates : SiloAuthSettingsUpdate ,
76+ ) -> UpdateResult < SiloAuthSettings > {
7777 opctx. authorize ( authz:: Action :: Modify , authz_silo) . await ?;
7878 use nexus_db_schema:: schema:: silo_auth_settings:: dsl;
7979 let silo_id = authz_silo. id ( ) ;
8080 diesel:: update ( dsl:: silo_auth_settings)
8181 . filter ( dsl:: silo_id. eq ( silo_id) )
8282 . set ( updates)
83- . returning ( SiloSettings :: as_returning ( ) )
83+ . returning ( SiloAuthSettings :: as_returning ( ) )
8484 . get_result_async ( & * self . pool_connection_authorized ( opctx) . await ?)
8585 . await
8686 . map_err ( |e| {
8787 public_error_from_diesel (
8888 e,
8989 ErrorHandler :: Conflict (
90- ResourceType :: SiloSettings ,
90+ ResourceType :: SiloAuthSettings ,
9191 & silo_id. to_string ( ) ,
9292 ) ,
9393 )
@@ -98,7 +98,7 @@ impl DataStore {
9898 & self ,
9999 opctx : & OpContext ,
100100 authz_silo : & authz:: Silo ,
101- ) -> Result < SiloSettings , Error > {
101+ ) -> Result < SiloAuthSettings , Error > {
102102 // Works for everyone when making a token because everyone can read
103103 // their own silo. Operators looking at silo settings will have silo
104104 // read on all silos.
0 commit comments