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