File tree Expand file tree Collapse file tree 5 files changed +182
-187
lines changed
Expand file tree Collapse file tree 5 files changed +182
-187
lines changed Original file line number Diff line number Diff line change @@ -353,8 +353,7 @@ impl From<UserListParameters> for identity_types::UserListParameters {
353353 domain_id : value. domain_id ,
354354 name : value. name ,
355355 unique_id : value. unique_id ,
356- user_type : None ,
357- // limit: value.limit,
356+ ..Default :: default ( ) // limit: value.limit,
358357 }
359358 }
360359}
Original file line number Diff line number Diff line change @@ -64,22 +64,13 @@ impl IdentityBackend for SqlBackend {
6464 state : & ServiceState ,
6565 params : & UserListParameters ,
6666 ) -> Result < Vec < UserResponse > , IdentityProviderError > {
67- // Determine user type to call appropriate listing function
68- if let Some ( val) = & params. user_type {
69- match val {
70- UserType :: Local => {
71- return Ok ( local_user:: list ( & self . config , & state. db , params) . await ?) ;
72- }
73- UserType :: NonLocal => {
74- // return Ok(nonlocal_user::list(&self.config, &state.db, params).await?);
75- }
76- UserType :: Federated => {
77- // return Ok(federated_user::list(&self.config, &state.db, params).await?);
78- }
79- UserType :: All => { /* continue to general listing */ }
80- }
67+ // Create a modified copy if user_type is None
68+ let mut modified_params = params. clone ( ) ;
69+ if modified_params. user_type . is_none ( ) {
70+ modified_params. user_type = Some ( UserType :: All ) ;
8171 }
82- Ok ( user:: list ( & self . config , & state. db , params) . await ?)
72+
73+ Ok ( user:: list ( & self . config , & state. db , & modified_params) . await ?)
8374 }
8475
8576 /// Get single user by ID
Original file line number Diff line number Diff line change @@ -17,11 +17,9 @@ use crate::identity::types::*;
1717
1818mod create;
1919mod get;
20- mod list;
2120mod load;
2221mod set;
2322
24- pub use list:: list;
2523pub use load:: load_local_user_with_passwords;
2624pub use load:: load_local_users_passwords;
2725pub use set:: reset_failed_auth;
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments