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

added town & nation contexts #5883

Merged
merged 2 commits into from
May 6, 2022

Conversation

Galster-dev
Copy link

Description:

Permission per town/nation is a must-have feature for people doing automation without new plugins. I don't understand why it is not a thing yet. Here's a PR to fix it


New Nodes/Commands/ConfigOptions:

none.


Relevant Towny Issue ticket:

Haven't seen one (surprisingly)


  • I have tested this pull request for defects on a server.

By making this pull request, I represent that I have the right to waive copyright and related rights to my contribution, and agree that all copyright and related rights in my contributions are waived, and I acknowledge that the TownyAdvanced organization has the copyright to use and modify my contribution under the Towny License for perpetuity.

@Galster-dev Galster-dev requested a review from LlmDl May 2, 2022 15:00
@LlmDl
Copy link
Member

LlmDl commented May 2, 2022

I think the only downside to this is that LP will check every context on each hasPermission test (or so I am told.) Adding further contexts will add additional load for servers that enable towny's LP contexts in the config.

Not that it replaces your PR but there is already a node given towny.town.TOWNNAME to all Town members. This could always be given child nodes.

I will defer to @Warriorrrr on this PR as he is the original author of our LP Contexts and knows more about it than I do.

Copy link
Member

@Warriorrrr Warriorrrr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding these new contexts is probably fine, I'll make a PR that allows server owners to configure what contexts to enable once this is merged.

@LlmDl LlmDl merged commit fc4de7c into TownyAdvanced:master May 6, 2022
LlmDl added a commit that referenced this pull request May 6, 2022
PR #5883. (First-Time Contributor!)
    - These are contexts that apply per-town and per-nation, making it
possible to give permissions to a single Town's members etc.
@LlmDl LlmDl added this to the 0.98.2.0 milestone May 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants