Closed devblackops closed 7 years ago
How about a default "Everyone" group that gets populated with new users joining a team/channel?
By not specifying a permission on a command, that command is available to everyone. Would there be a need for an Everyone
group is that case?
I guess it was a silly idea. I was trying to figure out how to provide help only for the commands in my module while using the builtin 'help' command.
Not silly at all. This project is in it's early stages and most of the documentation has yet to be written. If anything is unclear it helps to have it called out so it can be prioritized.
The help
command should list all commands for all loaded plugins. All exported functions from any vanilla PowerShell module loaded into PoshBot should show up in help
automatically and since those plugins (PS modules) don't include any PoshBot specific information, the commands will be available to everybody.
The [PoshBot.BotCommand()]
attribute is only needed when you wish to attach permissions to the command or change it's behavior in some way.
Those scenarios would be renaming the command to something other than the function name, having the command be executed in response to a regex expression being matched, a specific event (other than a message) being returned from the chat network, and a few other things.
Expected Behavior
New builtin commands should be added to create permissions and to associate those permissions to existing commands.
Current Behavior
These commands do not exist
Possible Solution
Proposed commands
Create a new permission associated with a plugin
Associate a permission with a plugin command
The current plugin and permission state that is saved to local storage will have to be extended to allow these adhoc permissions to be saved permanently. The current logic that loads plugins on startup will also have to be modified to merge in these permissions that aren't included with the module manifest.
Context
There will probably be cases where a 3rd party plugin is installed that does not include permissions, or the permissions included do not satisfy the bot administrator's needs.