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

refactor(api, db): team validation #1123

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AleksandrMatsko
Copy link
Member

@AleksandrMatsko AleksandrMatsko commented Nov 13, 2024

PR Summary

Before this PR it was possible to create teams with same names.

This PR forbids create/update of team with name which is alredy belongs to other team (no matter case, so names "Team name" and "Team Name" are the same then checking name existence).

Also:

  • Refactor team limits. Move limits to LimitsConfig.
  • Add tests for teams in dto package.

Note: Database schema is changed a bit. Added separate key ("moira-teams-by-names") to store team IDs by team names. Than saving/deleting team this key is also updated. Migrations are in #1124 .

@AleksandrMatsko AleksandrMatsko marked this pull request as ready for review November 13, 2024 11:16
@AleksandrMatsko AleksandrMatsko requested a review from a team as a code owner November 13, 2024 11:16
@AleksandrMatsko AleksandrMatsko changed the title refactor(api): team validation refactor(api, db): team validation Nov 13, 2024
@@ -33,6 +33,8 @@ const (
testSource DBSource = "test"
)

var _ moira.Database = &DbConnector{}
Copy link
Member

Choose a reason for hiding this comment

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

не поняла, зачем

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.

2 participants