File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -18,8 +18,11 @@ pub struct Store {
18
18
default_agent : Arc < Mutex < Option < crate :: agents:: Agent > > > ,
19
19
}
20
20
21
+ /// The URL used for stores that are not accessible on the web.
22
+ pub const LOCAL_STORE_URL_STR : & str = "local:store" ;
23
+
21
24
lazy_static:: lazy_static! {
22
- static ref LOCAL_STORE_URL : Url = Url :: parse( "local:store" ) . unwrap( ) ;
25
+ static ref LOCAL_STORE_URL : Url = Url :: parse( LOCAL_STORE_URL_STR ) . unwrap( ) ;
23
26
}
24
27
25
28
impl Store {
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ use crate::{
8
8
errors:: AtomicError ,
9
9
hierarchy,
10
10
schema:: { Class , Property } ,
11
+ store:: LOCAL_STORE_URL_STR ,
11
12
values:: query_value_compare,
12
13
} ;
13
14
use crate :: { errors:: AtomicResult , parse:: parse_json_ad_string} ;
@@ -223,6 +224,9 @@ pub trait Storelike: Sized {
223
224
/// the answer should always be `true`.
224
225
fn is_external_subject ( & self , subject : & str ) -> AtomicResult < bool > {
225
226
if let Some ( self_url) = self . get_self_url ( ) {
227
+ if self_url. as_str ( ) == LOCAL_STORE_URL_STR {
228
+ return Ok ( true ) ;
229
+ }
226
230
if subject. starts_with ( & self_url. as_str ( ) ) {
227
231
return Ok ( false ) ;
228
232
} else {
You can’t perform that action at this time.
0 commit comments