Skip to content

Conversation

@tushyjw
Copy link

@tushyjw tushyjw commented Dec 19, 2025

This feature adds object type filtering to delete membership operations in the Grouper LDAP/AD provisioner, enabling administrators to selectively control which memberships get deleted based on their object type (user, group, or entity).

Changes Made

  • Added deleteMembershipsObjectTypeFilter configuration property with dropdown UI
  • Implemented filtering logic in GrouperProvisioningBehavior.isDeleteMembership() method
  • Added configuration class support with getter/setter methods
  • Added validation to ensure only valid object types are configured
  • Positioned filter to work alongside existing delete conditions (ifGrouperCreated, ifGrouperDeleted, etc.)

Benefits

  • Provides fine-grained control over delete operations
  • Prevents accidental deletion of critical memberships (e.g., service accounts, group entities)
  • Maintains backward compatibility - filter is optional and defaults to no filtering
  • Works with all existing delete membership configurations

Configuration

The filter is configured via the new deleteMembershipsObjectTypeFilter property with options:

  • Empty string (default) = no filtering
  • "user" = only delete user memberships
  • "group" = only delete group memberships
  • "entity" = only delete entity memberships

The filter is evaluated early in the delete decision process, allowing type-based exclusions before other delete conditions are applied.

feat: Add object type filter configuration for delete membership operations  
  
- Add deleteMembershipsObjectTypeFilter property to grouper-loader.base.properties  
- Enables filtering delete operations by object type (user, group, entity)  
- Positioned after main deleteMemberships flag with order 3550  
- Includes dropdown UI configuration with validation options
…class support for object type filtering

feat: Add configuration class support for object type filtering  
  
- Add deleteMembershipsObjectTypeFilter field to GrouperProvisioningConfiguration  
- Implement getter/setter methods for the new property  
- Add configuration loading in populateConfigurationFromProperties()  
- Enables Java code to access the object type filter setting
…iltering logic in delete membership

feat: Implement object type filtering logic in delete membership  
  
- Add filter logic to isDeleteMembership() method  
- Apply filter early in decision process before other delete conditions  
- Return false when object type doesn't match configured filter  
- Access deleteMembershipsObjectTypeFilter from configuration
…dation for object type filter in delete membership

feat: Add validation for object type filter in delete membership  
  
- Validate deleteMembershipsObjectTypeFilter values  
- Ensure only 'user', 'group', or 'entity' are allowed  
- Add error message for invalid filter values  
- Position validation after delete type checks
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.

1 participant