summaryrefslogtreecommitdiff
path: root/poezio
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2020-05-09 23:14:26 +0200
committermathieui <mathieui@mathieui.net>2020-05-09 23:14:26 +0200
commiteda88a59a6b56c70fcbc9e2f5ef705a17d74c381 (patch)
tree472ba1fdeba470d576fbbc0a7308e6e3d4ecfe8a /poezio
parent2eb362ffe86dda15e75e3be227acdfce695bfeab (diff)
downloadpoezio-eda88a59a6b56c70fcbc9e2f5ef705a17d74c381.tar.gz
poezio-eda88a59a6b56c70fcbc9e2f5ef705a17d74c381.tar.bz2
poezio-eda88a59a6b56c70fcbc9e2f5ef705a17d74c381.tar.xz
poezio-eda88a59a6b56c70fcbc9e2f5ef705a17d74c381.zip
Add back the deny_anonymous decorator to /add and /accept
Diffstat (limited to 'poezio')
-rw-r--r--poezio/core/commands.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/poezio/core/commands.py b/poezio/core/commands.py
index b00cf24a..f5594d5d 100644
--- a/poezio/core/commands.py
+++ b/poezio/core/commands.py
@@ -17,11 +17,12 @@ from slixmpp.xmlstream.matcher import StanzaPath
from poezio import common
from poezio import pep
from poezio import tabs
+from poezio import multiuserchat as muc
from poezio.bookmarks import Bookmark
from poezio.common import safeJID
from poezio.config import config, DEFAULT_CONFIG, options as config_opts
-from poezio import multiuserchat as muc
from poezio.contact import Contact, Resource
+from poezio.decorators import deny_anonymous
from poezio.plugin import PluginConfig
from poezio.roster import roster
from poezio.theming import dump_tuple, get_theme
@@ -517,6 +518,7 @@ class CommandCore:
else:
self.core.information('No bookmark to remove', 'Info')
+ @deny_anonymous
@command_args_parser.quoted(0, 1)
def command_accept(self, args):
"""
@@ -553,6 +555,7 @@ class CommandCore:
pto=jid, ptype='subscribe', pnick=self.core.own_nick)
self.core.information('%s is now authorized' % jid, 'Roster')
+ @deny_anonymous
@command_args_parser.quoted(1)
def command_add(self, args):
"""