@@ -9,9 +9,13 @@ use serde_json::Value;
99use strum:: EnumIs ;
1010
1111#[ cfg( feature = "finder" ) ]
12- use crate :: database:: finder:: { Cred , ExecSettings , FilterMatcher , TaskMatch , UserMin } ;
12+ use crate :: database:: finder:: { ActorMatchMin , Cred , ExecSettings , TaskMatch } ;
13+ use crate :: database:: FilterMatcher ;
1314
14- use crate :: database:: structs:: { SActor , SConfig , SRole , STask } ;
15+ use crate :: database:: {
16+ actor:: SActor ,
17+ structs:: { SConfig , SRole , STask } ,
18+ } ;
1519use once_cell:: sync:: Lazy ;
1620static API : Lazy < Mutex < PluginManager > > = Lazy :: new ( || Mutex :: new ( PluginManager :: new ( ) ) ) ;
1721
@@ -52,7 +56,7 @@ pub type TaskMatcher = fn(
5256 matcher : & mut TaskMatch ,
5357) -> PluginResultAction ;
5458#[ cfg( feature = "finder" ) ]
55- pub type UserMatcher = fn ( role : & SRole , user : & Cred , user_struct : & Value ) -> UserMin ;
59+ pub type UserMatcher = fn ( role : & SRole , user : & Cred , user_struct : & Value ) -> ActorMatchMin ;
5660
5761pub type RoleInformation = fn ( role : & SRole ) -> Option < String > ;
5862pub type ActorInformation = fn ( actor : & SActor ) -> Option < String > ;
@@ -200,15 +204,15 @@ impl PluginManager {
200204 }
201205
202206 #[ cfg( feature = "finder" ) ]
203- pub fn notify_user_matcher ( role : & SRole , user : & Cred , user_struct : & Value ) -> UserMin {
207+ pub fn notify_user_matcher ( role : & SRole , user : & Cred , user_struct : & Value ) -> ActorMatchMin {
204208 let api = API . lock ( ) . unwrap ( ) ;
205209 for plugin in api. user_matcher_plugins . iter ( ) {
206210 let res = plugin ( role, user, user_struct) ;
207211 if !res. is_no_match ( ) {
208212 return res;
209213 }
210214 }
211- UserMin :: NoMatch
215+ ActorMatchMin :: NoMatch
212216 }
213217
214218 #[ cfg( feature = "finder" ) ]
0 commit comments