circuits / kdb

kdb is a small pluggable IRC Bot framework utilizing the circuits Python Application Framework
Other
6 stars 4 forks source link

ACL list for modules #5

Closed therealromster closed 5 years ago

therealromster commented 9 years ago

I would like to use an ACL list for allowing and restricting what commands in each plugin a user can issue.

This could be done by flags or even subscribe a user to a channel. Users would need to identify to the bot. However some commands could use nickserv to see if the nick is identified to a specific user account name, and channel access list possibly.

prologic commented 9 years ago

Seems to be two features here :) Which are we implementing? Are we going to implement this in one plugin or split/separate it out into two?

I can see this working as a new plugin that "intercepts" commands and filters them based on whether the user has permission to "execute" that command.

Question is; how do we want this "permission" list specified?

therealromster commented 9 years ago

This should be two plugins, one that uses the channel list and any chanop users, the other plugin using a flatfile database or json... or something database that the bot can read and write, add and remove entries.

prologic commented 9 years ago

Hmm let's spend a bit more time on this one; it's not yet exactly clear to me how this should work :)

prologic commented 9 years ago

Some useful tools and libraires:

prologic commented 9 years ago

Thinking about the following configuration:

[acl.groups]
owner = '^.*$'
admin = ['^(load|unload).*$']
users = ['^uptime$', '^[cnm]stats$']

[acl.users]
prologic = ['admin']
romster = ['admin', 'users']
* = ['users']