Mercurial > libervia-pubsub
changeset 257:30988781f30d
fixed access check (getItems/notifications)
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 28 Apr 2013 19:29:13 +0200 |
parents | ea44c0986f47 |
children | e5b83fbb0219 |
files | sat_pubsub/backend.py |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/sat_pubsub/backend.py Wed Apr 17 22:28:41 2013 +0200 +++ b/sat_pubsub/backend.py Sun Apr 28 19:29:13 2013 +0200 @@ -394,7 +394,7 @@ else: is_user_jid = bool(nodeIdentifierJID.user) - if is_user_jid and nodeIdentifierJID.userhost() != requestor.userhost(): + if is_user_jid and nodeIdentifierJID.userhostJID() != requestor.userhostJID(): #we have an user jid node, but not created by the owner of this jid print "Wrong creator" raise error.Forbidden() @@ -461,7 +461,7 @@ @param entity: entity which must be in group @return: True if requestor is in roster""" roster, authorized_groups = roster_groups - _entity = entity.userhost() + _entity = entity.userhostJID() if not _entity in roster: raise error.NotInRoster @@ -749,7 +749,7 @@ if access_model == 'open': allowed_items.append(item) elif access_model == 'roster': - _subscriber = subscriber.userhost() + _subscriber = subscriber.userhostJID() if not _subscriber in roster: continue #the subscriber is known, is he in the right group ?