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

[FEATURE] Allow to limit owners and admins of team depend on team rank #156

Closed
GuazP opened this issue Jun 11, 2021 · 5 comments
Closed
Assignees
Labels
enhancement (uncategorised) New feature or request In Next Update Issues tagged with this will be implemented / fixed for the next update

Comments

@GuazP
Copy link

GuazP commented Jun 11, 2021

Is your feature request related to a problem? Please describe.
I would like to limit how many owners or admins could team have along max members per rank of team.

Describe the solution you'd like
As above

Describe alternatives you've considered
Not applies

Additional context
Not applies

@GuazP GuazP added the enhancement (uncategorised) New feature or request label Jun 11, 2021
@github-actions github-actions bot added this to TODO in Project Plan Jun 11, 2021
@megargayu
Copy link
Contributor

So, this is how I would visualize how this would work (in config.yml):

# Used to limit the number of each rank allowed in teams
# - If this is set as 0 or a negative number the rank would be allowed infinitely
# - If a rank is not set, it is allowed infinitely 
#
# Possible values: [Rank, followed by an integer]
maxTeamRanks:
   OWNER: 2
   ADMIN: 2
   DEFAULT: 0

This example would make every team have a max of 2 owners, 2 admins, and infinite members (set within the limits of maxTeamLength).

One problem would be with singleOwner - this probably would have to be removed. However, what would happen to /team setowner then? I think that /team setowner should be deleted in favor of putting more logic into /team promote, but that's up to debate.

Another point would be with levels - should we add maxTeamRanks to it?

Also want to point out that this will make interesting behavior with maxTeamLength and that code would probably need to be refactored.

@booksaw what do you think?

@booksaw
Copy link
Owner

booksaw commented Jun 15, 2021

Default could be left out, and I think it could be added to the level section as another perk of leveling up your team.

The issue with removing setowner is if a single owner is allowed in a team, how would you give up owner using /team promote without making it very clear you would be losing your owner status?
I think it would be better to keep setowner and only allow owners of a team to run it if their team level is only allowed a single owner else just throw some error message. The current singleOwner stuff in the config could be removed.

If the default rank is not limited in size, we could keep maxTeamLength as it is, this would also mean you would not be forced to promote people you dont fully trust to get space for more team members.

Things to note:
The config should allow -1 to be used for no limit.
The limit should be switched to one

@megargayu
Copy link
Contributor

@booksaw

Then, I think it might be better to scrap singleOwner and instead add two new nodes, maxOwners and maxAdmins, and let maxTeamLength decide the rest of DEFAULT rank. However, the plugin would probably need to check if maxOwners + maxAdmins <= maxTeamLength at startup to make sure that we don't get a negative team length. Or, just remove maxTeamLength and instead add a maxDefault?

Also, we could use singleOwner only if maxOwners == 1. And yes, -1 should be allowed.

@stale
Copy link

stale bot commented Aug 6, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the inactive The issue has had no activity for 20 days, it will be closed in 10 days time label Aug 6, 2021
@booksaw booksaw added the In Next Update Issues tagged with this will be implemented / fixed for the next update label Aug 26, 2021
@stale stale bot removed the inactive The issue has had no activity for 20 days, it will be closed in 10 days time label Aug 26, 2021
booksaw added a commit that referenced this issue Sep 2, 2021
@booksaw
Copy link
Owner

booksaw commented Sep 2, 2021

This feature has been implemented and will be included in the next update. Thank you for the suggestion.

@booksaw booksaw closed this as completed Sep 2, 2021
Project Plan automation moved this from TODO to Finished Sep 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement (uncategorised) New feature or request In Next Update Issues tagged with this will be implemented / fixed for the next update
Projects
No open projects
Development

No branches or pull requests

3 participants