mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-24 06:16:47 +00:00
feat(group): manage users in user groups (#10940)
# Which Problems Are Solved 1. Adding users to user groups and removing users from user groups. 2. Searching for users in user groups by group IDs or user IDs # How the Problems Are Solved By adding: 1. The API definitions to manage users in users groups 3. The command-layer implementation of adding users/removing users to/from user groups. 4. The projection table group_users1 5. Query-side implementation to search for users in user groups # Additional Changes 1. Remove debug statements from unit tests. 2. Fix removal of groups when orgs are removed 3. Add unit tests for groups projection # Additional Context * Related to #9702 * Follow-up for PRs * https://github.com/zitadel/zitadel/pull/10455 * https://github.com/zitadel/zitadel/pull/10758 * https://github.com/zitadel/zitadel/pull/10853
This commit is contained in:
@@ -104,7 +104,8 @@ var (
|
||||
MembershipFields *handler.FieldHandler
|
||||
PermissionFields *handler.FieldHandler
|
||||
|
||||
GroupProjection *handler.Handler
|
||||
GroupProjection *handler.Handler
|
||||
GroupUsersProjection *handler.Handler
|
||||
)
|
||||
|
||||
type projection interface {
|
||||
@@ -211,6 +212,7 @@ func Create(ctx context.Context, sqlClient *database.DB, es handler.EventStore,
|
||||
// Don't forget to add the new field handler to [ProjectInstanceFields]
|
||||
|
||||
GroupProjection = newGroupProjection(ctx, applyCustomConfig(projectionConfig, config.Customizations["groups"]))
|
||||
GroupUsersProjection = newGroupUsersProjection(ctx, applyCustomConfig(projectionConfig, config.Customizations["group_users"]))
|
||||
|
||||
InstanceRelationalProjection = newInstanceRelationalProjection(ctx, applyCustomConfig(projectionConfig, config.Customizations["instances_relational"]))
|
||||
OrganizationRelationalProjection = newOrgRelationalProjection(ctx, applyCustomConfig(projectionConfig, config.Customizations["organizations_relational"]))
|
||||
@@ -403,6 +405,7 @@ func newProjectionsList() {
|
||||
HostedLoginTranslationProjection,
|
||||
OrganizationSettingsProjection,
|
||||
GroupProjection,
|
||||
GroupUsersProjection,
|
||||
|
||||
InstanceRelationalProjection,
|
||||
OrganizationRelationalProjection,
|
||||
|
||||
Reference in New Issue
Block a user