@@ -6,8 +6,8 @@ use diesel::prelude::*;
6
6
use nexus_db_errors:: ErrorHandler ;
7
7
use nexus_db_errors:: public_error_from_diesel;
8
8
use 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 ;
11
11
use omicron_common:: api:: external:: DeleteResult ;
12
12
use omicron_common:: api:: external:: Error ;
13
13
use omicron_common:: api:: external:: ResourceType ;
@@ -27,7 +27,7 @@ impl DataStore {
27
27
& self ,
28
28
conn : & async_bb8_diesel:: Connection < DbConnection > ,
29
29
authz_silo : & authz:: Silo ,
30
- settings : SiloSettings ,
30
+ settings : SiloAuthSettings ,
31
31
) -> Result < ( ) , Error > {
32
32
let silo_id = authz_silo. id ( ) ;
33
33
use nexus_db_schema:: schema:: silo_auth_settings;
@@ -40,7 +40,7 @@ impl DataStore {
40
40
public_error_from_diesel (
41
41
e,
42
42
ErrorHandler :: Conflict (
43
- ResourceType :: SiloSettings ,
43
+ ResourceType :: SiloAuthSettings ,
44
44
& silo_id. to_string ( ) ,
45
45
) ,
46
46
)
@@ -72,22 +72,22 @@ impl DataStore {
72
72
& self ,
73
73
opctx : & OpContext ,
74
74
authz_silo : & authz:: Silo ,
75
- updates : SiloSettingsUpdate ,
76
- ) -> UpdateResult < SiloSettings > {
75
+ updates : SiloAuthSettingsUpdate ,
76
+ ) -> UpdateResult < SiloAuthSettings > {
77
77
opctx. authorize ( authz:: Action :: Modify , authz_silo) . await ?;
78
78
use nexus_db_schema:: schema:: silo_auth_settings:: dsl;
79
79
let silo_id = authz_silo. id ( ) ;
80
80
diesel:: update ( dsl:: silo_auth_settings)
81
81
. filter ( dsl:: silo_id. eq ( silo_id) )
82
82
. set ( updates)
83
- . returning ( SiloSettings :: as_returning ( ) )
83
+ . returning ( SiloAuthSettings :: as_returning ( ) )
84
84
. get_result_async ( & * self . pool_connection_authorized ( opctx) . await ?)
85
85
. await
86
86
. map_err ( |e| {
87
87
public_error_from_diesel (
88
88
e,
89
89
ErrorHandler :: Conflict (
90
- ResourceType :: SiloSettings ,
90
+ ResourceType :: SiloAuthSettings ,
91
91
& silo_id. to_string ( ) ,
92
92
) ,
93
93
)
@@ -98,7 +98,7 @@ impl DataStore {
98
98
& self ,
99
99
opctx : & OpContext ,
100
100
authz_silo : & authz:: Silo ,
101
- ) -> Result < SiloSettings , Error > {
101
+ ) -> Result < SiloAuthSettings , Error > {
102
102
// Works for everyone when making a token because everyone can read
103
103
// their own silo. Operators looking at silo settings will have silo
104
104
// read on all silos.
0 commit comments