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

[RFC] Dynamic privileges.AccessLevel features #2598

Open
dgw opened this issue Mar 16, 2024 · 0 comments
Open

[RFC] Dynamic privileges.AccessLevel features #2598

dgw opened this issue Mar 16, 2024 · 0 comments
Labels
Feature Needs Triage Issues that need to be reviewed and categorized

Comments

@dgw
Copy link
Member

dgw commented Mar 16, 2024

This is just a nugget of an idea for now, but I was reminded toward the end of drafting the changelog for 8.0.0 that we did indeed lay the foundations for making privileges / access levels integrate better with what the server advertises.

As Sopel continues to improve its handling of ISUPPORT, STATUSMSG, and other protocol features, I can foresee that there will be demand for more dynamic functionality. Some wild ideas that came to me:

  • Make available only the AccessLevel members that actually map to available prefixes the server advertises in ISUPPORT's PREFIX
  • Given a STATUSMSG prefix, look up which AccessLevel that corresponds to
  • Given a desired canonical access level, find out whether the server supports it
  • Specify fallback sequences for decorators such as @plugin.require_privilege() (e.g. require at least HALFOP if it's available, otherwise require OP or above)

I haven't looked at the protocol again just yet to see how feasible these might be, but all the same I wanted to get them out of my private notepad and into the issue tracker so they don't get lost—and so others can weigh in.

@dgw dgw added Feature Needs Triage Issues that need to be reviewed and categorized labels Mar 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Needs Triage Issues that need to be reviewed and categorized
Projects
None yet
Development

No branches or pull requests

1 participant