Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement command permission system #25

Open
BinkanSalaryman opened this issue Apr 21, 2020 · 1 comment
Open

Implement command permission system #25

BinkanSalaryman opened this issue Apr 21, 2020 · 1 comment

Comments

@BinkanSalaryman
Copy link
Owner

BinkanSalaryman commented Apr 21, 2020

By current implementation, any guild member can issue any command (provided they have access to a bound command channel). In the legacy .NET version it was a complex and confusing implementation, so I kindly ask:

What should be covered (and how) by the next iteration of the permission system? How to handle default permissions?

For the sake of completion I attempt to summarize what the previous iteration was like:

  • Via command "permissions assign user|role permissions..." a permission entry for given user or all users of given role could be assigned
  • A permission entry looked something like this:
    • utils.mail(to,message) - grant permission to use "mail" command to specified user/role

    • !utils.mail(to,message) - revoke permission to use "mail" command to specified user/role

    • ~utils.mail(to,message) - reset permission / remove entry which granted or revoked permission to use "mail" command to specified user/role

    • * - grant all permissions by default to specified user/role

    • !* - revoke all permissions by default to specified user/role

    • ~* - reset all permissions of specified user/role

  • All permissions entries regarding role and user entries, and grant/revoke all (->blacklist/whitelist) were hierarchically evaluated to resolved to the result to either ACCEPT or REJECT a command execution request. A reasonable default value for each command would be taken if no permissions were assigned (you could say all permission entries acted as overrides to this default).
@BinkanSalaryman
Copy link
Owner Author

BinkanSalaryman commented Oct 29, 2020

UPDATE:
It's far from perfect, but for now sensitive or state modifying commands either require administrator permission in a guild, or bot ownership.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant