Log actual disabled function for multiuser plugin
This commit is contained in:
parent
61ac6a30d3
commit
70cc982e2e
1 changed files with 2 additions and 1 deletions
|
@ -7,6 +7,7 @@ from Plugin import PluginManager
|
||||||
from Crypt import CryptBitcoin
|
from Crypt import CryptBitcoin
|
||||||
from . import UserPlugin
|
from . import UserPlugin
|
||||||
from util.Flag import flag
|
from util.Flag import flag
|
||||||
|
from Translate import translate as _
|
||||||
|
|
||||||
# We can only import plugin host clases after the plugins are loaded
|
# We can only import plugin host clases after the plugins are loaded
|
||||||
@PluginManager.afterLoad
|
@PluginManager.afterLoad
|
||||||
|
@ -212,7 +213,7 @@ class UiWebsocketPlugin(object):
|
||||||
flags = flag.db.get(self.getCmdFuncName(cmd), ())
|
flags = flag.db.get(self.getCmdFuncName(cmd), ())
|
||||||
is_public_proxy_user = not config.multiuser_local and self.user.master_address not in local_master_addresses
|
is_public_proxy_user = not config.multiuser_local and self.user.master_address not in local_master_addresses
|
||||||
if is_public_proxy_user and "no_multiuser" in flags:
|
if is_public_proxy_user and "no_multiuser" in flags:
|
||||||
self.cmd("notification", ["info", "This function is disabled on this proxy!"])
|
self.cmd("notification", ["info", _("This function ({cmd}) is disabled on this proxy!")])
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
return super(UiWebsocketPlugin, self).hasCmdPermission(cmd)
|
return super(UiWebsocketPlugin, self).hasCmdPermission(cmd)
|
||||||
|
|
Loading…
Reference in a new issue