S

Tries to get roster even if not using PEP

I made a blog node on my sat_pubsub with multiple owners, published a test post from Movim and then made some comments from another account. Trying to load libervia-web I did not see the comments and this backtrace from sat_pubsub: https://bhh.sh/659

This patch fixed it and I can see comments now:

diff -r 0b5233981671 sat_pubsub/backend.py
--- a/sat_pubsub/backend.py     Mon Aug 02 21:58:17 2021 +0200
+++ b/sat_pubsub/backend.py     Mon Aug 16 15:08:59 2021 +0000
@@ -1082,7 +1082,7 @@
         else:
             if roster is None:
                 # FIXME: publisher roster should be used, not owner
-                roster = await self.getOwnerRoster(node)
+                # roster = await self.getOwnerRoster(node)
                 if roster is None:
                     roster = {}
             roster_item = roster.get(requestor.userhostJID())
G

goffi 21/10/2021, 10:30

the traceback is not available anymore, please don't use auto-expiring paste service, you can paste the tb directly here.

G

goffi 21/10/2021, 15:22

For the record, I believe that the traceback is this one, as I could reproduce the issue: Traceback (most recent call last): --- <exception caught here> --- File "/home/goffi/venvs/sat_pubsub/lib/python3.8/site-packages/twisted/internet/defer.py", line 662, in _runCallbacks current.result = callback(current.result, *args, **kw) File "/home/goffi/venvs/sat_pubsub/lib/python3.8/site-packages/wokkel/subprotocols.py", line 449, in fromStanzaError failure.trap(error.StanzaError) File "/home/goffi/venvs/sat_pubsub/lib/python3.8/site-packages/twisted/python/failure.py", line 450, in trap self.raiseException() File "/home/goffi/venvs/sat_pubsub/lib/python3.8/site-packages/twisted/python/failure.py", line 475, in raiseException raise self.value.with_traceback(self.tb) File "/home/goffi/venvs/sat_pubsub/lib/python3.8/site-packages/twisted/internet/defer.py", line 662, in _runCallbacks current.result = callback(current.result, *args, **kw) File "/home/goffi/venvs/sat_pubsub/lib/python3.8/site-packages/wokkel/subprotocols.py", line 445, in checkNotImplemented failure.trap(NotImplementedError) File "/home/goffi/venvs/sat_pubsub/lib/python3.8/site-packages/twisted/python/failure.py", line 450, in trap self.raiseException() File "/home/goffi/venvs/sat_pubsub/lib/python3.8/site-packages/twisted/python/failure.py", line 475, in raiseException raise self.value.with_traceback(self.tb) File "/home/goffi/venvs/sat_pubsub/lib/python3.8/site-packages/twisted/internet/defer.py", line 662, in _runCallbacks current.result = callback(current.result, *args, **kw) File "/home/goffi/dev/sat_pubsub/sat_pubsub/backend.py", line 1683, in _mapErrors e = failure.trap(*list(self._errorMap.keys())) File "/home/goffi/venvs/sat_pubsub/lib/python3.8/site-packages/twisted/python/failure.py", line 450, in trap self.raiseException() File "/home/goffi/venvs/sat_pubsub/lib/python3.8/site-packages/twisted/python/failure.py", line 475, in raiseException raise self.value.with_traceback(self.tb) File "/home/goffi/dev/sat_pubsub/sat_pubsub/backend.py", line 1123, in getItemsData roster = await self.getOwnerRoster(node) File "/home/goffi/dev/sat_pubsub/sat_pubsub/backend.py", line 1092, in getOwnerRoster roster = await self.privilege.getRoster(owner_jid) File "/home/goffi/dev/sat_pubsub/sat_pubsub/privilege.py", line 250, in getRoster raise failure.Failure(NotAllowedError('roster get is not allowed')) sat_pubsub.privilege.NotAllowedError: roster get is not allowed

G

goffi 21/10/2021, 15:26

Note that retrieving roster can be useful even without PEP, as there is the `published-roster` access role which is managed by Libervia Pubsub: it allows to restrict a node or a post only to a specific group from publisher's roster (owner is actually used at the moment).

id

390

author

Singpolyma

created

16/08/2021, 15:10

updated

21/10/2021, 16:14

labels
sat_pubsub
type
bug
status
closed
priority
normal
milestone
0.7
severity
normal