mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-23 23:02:25 +00:00
change name of the query "allow_local_access()?" to "local_access_is_allowed()"
So as to avoid confusing it with the setter method "allow_local_access(allowed=True)".
This commit is contained in:
parent
9c1a9d8959
commit
427bf2cdc9
@ -21,7 +21,7 @@ def getxmlfile(name):
|
||||
class IClient(Interface):
|
||||
pass
|
||||
class ILocalAccess(Interface):
|
||||
def allow_local_access():
|
||||
def local_access_is_allowed():
|
||||
pass
|
||||
|
||||
|
||||
@ -920,7 +920,7 @@ class VDrive(rend.Page):
|
||||
if localdir != os.path.abspath(localdir):
|
||||
return NeedAbsolutePathError(), ()
|
||||
if localfile or localdir:
|
||||
if not ILocalAccess(ctx).allow_local_access():
|
||||
if not ILocalAccess(ctx).local_access_is_allowed():
|
||||
return LocalAccessDisabledError(), ()
|
||||
if req.getHost().host != LOCALHOST:
|
||||
return NeedLocalhostError(), ()
|
||||
@ -1132,7 +1132,7 @@ class LocalAccess:
|
||||
implements(ILocalAccess)
|
||||
def __init__(self):
|
||||
self.local_access = False
|
||||
def allow_local_access(self):
|
||||
def local_access_is_allowed(self):
|
||||
return self.local_access
|
||||
|
||||
class WebishServer(service.MultiService):
|
||||
|
Loading…
Reference in New Issue
Block a user