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

support max member limit on roles and groups #2424

Merged
merged 2 commits into from
Nov 28, 2023
Merged

support max member limit on roles and groups #2424

merged 2 commits into from
Nov 28, 2023

Conversation

havetisyan
Copy link
Collaborator

@havetisyan havetisyan commented Nov 21, 2023

Description

support max member limit on roles and groups

Contribution Checklist:

  • The pull request does not introduce any breaking changes
  • I have read the contribution guidelines.
  • Create an issue and link to the pull request.

Attach Screenshots (Optional)

Signed-off-by: Henry Avetisyan <hga@yahooinc.com>
@@ -90,6 +90,7 @@ CREATE TABLE IF NOT EXISTS `zms_server`.`role` (
`group_expiry_days` INT NOT NULL DEFAULT 0,
`description` VARCHAR(4096) NOT NULL DEFAULT '',
`delete_protection` TINYINT(1) NOT NULL DEFAULT 0,
`max_members` INT NOT NULL DEFAULT 0,
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we have some other numbers as the default value instead of 0?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No, we can't introduce backward incompatible changes. Value of 0 indicates there is no limit which is the current behavior.

Signed-off-by: Henry Avetisyan <hga@yahooinc.com>
// so at this point we know that we'll be adding a new member to the
// role. so first let's count the number of role members

int roleMemberCount = con.countRoleMembers(domainName, roleName);
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it meant to count the expired members also as valid role/group member in terms of count?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes, the count includes everyone regardless if they're expired or not

@havetisyan havetisyan merged commit 1ac2408 into master Nov 28, 2023
2 checks passed
@havetisyan havetisyan deleted the max_members branch November 28, 2023 19:20
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