errbotio / errbot

Errbot is a chatbot, a daemon that connects to your favorite chat service and bring your tools and some fun into the conversation.
http://errbot.io
GNU General Public License v3.0
3.09k stars 608 forks source link

allow rooms broken in acls (single line fix) #1606

Closed error5 closed 1 year ago

error5 commented 1 year ago

The below line contains a 'not' which does the opposite of intended, please remove.

https://github.com/errbotio/errbot/blame/master/errbot/core_plugins/acls.py#L120

Broken: if "allowrooms" in acl and not glob(room, acl["allowrooms"]):

Fix: if "allowrooms" in acl and glob(room, acl["allowrooms"]):

nzlosh commented 1 year ago

Can you elaborate on why you think this code is incorrect?

error5 commented 1 year ago

sorry @nzlosh long day ive raised in error. comparison not working for another reason locally.

nzlosh commented 1 year ago

No problem, thanks for taking the time for raising a potential problem and good to hear you got it figured out.

error5 commented 1 year ago

Right got it, so the SlackV3 backend is passing through this string for the room variable.

'<#ABC123456|myroom>'

had to update to account for this in the config.py : 'allowrooms': ('<#ABC123456|myroom>')

This was not obvious to me since updating.

Many Thanks.