lasdf1234 opened a new pull request, #12494:
URL: https://github.com/apache/gravitino/pull/12494
### What changes were proposed in this pull request?
Add an optional description for built-in IdP groups.
- Persist `group_comment VARCHAR(256) DEFAULT ''` on `idp_group_meta`
(aligned with `tag_comment` / `column_comment`).
- Expose optional REST JSON field `comment` on group create (`POST
/api/idp/groups`) and get.
- Omit on create → store empty string.
- Existing rows get `''` via column default / 1.3.0 → 2.0.0 upgrade.
- Schema: 2.0.0 CREATE + 1.3.0 → 2.0.0 ALTER for MySQL, PostgreSQL, and H2.
Released 1.3.0 schema is unchanged.
- OpenAPI and `docs/security/local-users-and-groups.md` updated.
Update-group REST (`PUT /api/idp/groups/{group}`) is out of scope; create
writes the comment and GET returns it.
### Why are the changes needed?
Local IdP groups currently store only `group_name`. Operators have no place
to record a short description (purpose, owner, etc.) when creating a group.
Fix: #12493
### Does this PR introduce _any_ user-facing change?
- Optional `comment` on `POST /api/idp/groups` request body (max 256
characters).
- `comment` returned on group GET responses.
- New `idp_group_meta.group_comment` column after upgrade to 2.0.0.
### How was this patch tested?
- Unit tests: `TestIdpUserGroupManager`, `TestAddGroupRequest`,
`TestIdpGroupDTO`, `TestIdpGroupPO`, `TestIdpGroupMetaStorage`,
`TestIdpOperations`.
Made with [Cursor](https://cursor.com)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]