Skip to content

feat(iam): user management#63

Merged
designcode merged 2 commits intomainfrom
iam/user-management
Feb 20, 2026
Merged

feat(iam): user management#63
designcode merged 2 commits intomainfrom
iam/user-management

Conversation

@designcode
Copy link
Collaborator

@designcode designcode commented Feb 20, 2026

Note

Low Risk
Lint-only configuration change; affects developer tooling and CI lint behavior but not runtime code.

Overview
Migrates ESLint configuration from legacy .eslintrc.json to the ESLint v10 flat config format via a new eslint.config.js.

The new config keeps the same TypeScript and core rule set while switching ignore patterns to glob-based ignores entries.

Written by Cursor Bugbot for commit e9a50a0. This will update automatically on new commits. Configure here.

@greptile-apps
Copy link

greptile-apps bot commented Feb 20, 2026

Greptile Summary

This PR adds comprehensive user management functionality to the IAM package, including inviting users, listing users/invitations, updating roles, and deleting users/invitations. The implementation includes proper validation to prevent accidental removal or demotion of organization owners.

  • Added management endpoint support (mgmtEndpoint) alongside existing IAM endpoint
  • Implemented 5 new user management operations with consistent API patterns
  • Added organization owner protection in deleteUser and updateUserRole to prevent removing/demoting owners
  • Proper API response transformation from snake_case to camelCase
  • Consistent error handling across all operations

One issue found: config.ts removed the default fallback for iamEndpoint when loading from env vars, which could cause undefined values (though http-client.ts still provides a fallback).

Confidence Score: 4/5

  • This PR is safe to merge with minimal risk after addressing the config default value issue
  • The implementation is well-structured with proper validation and error handling. The only issue is the removed default fallback in config.ts which could lead to undefined values, though there's still a fallback in http-client.ts. All new functionality follows existing patterns and includes owner protection logic.
  • Pay close attention to packages/iam/src/lib/config.ts - verify the removed default fallback doesn't break existing deployments

Important Files Changed

Filename Overview
packages/iam/src/lib/config.ts Removed unused error handling utilities and added mgmtEndpoint configuration. Removed default fallback for iamEndpoint which could cause issues if env var is not set.
packages/iam/src/lib/users/list.ts Implements user and invitation listing with proper API response transformation and null-safe handling.
packages/iam/src/lib/users/delete.ts Implements user deletion with organization owner protection logic to prevent accidental removal of owners.
packages/iam/src/lib/users/update-role.ts Implements role updates with validation to prevent demoting organization owners from admin role.

Last reviewed commit: 27680ca

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

10 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@designcode designcode force-pushed the iam/user-management branch 5 times, most recently from 729def5 to 364e3f3 Compare February 20, 2026 13:01
@designcode designcode merged commit 9dff64b into main Feb 20, 2026
2 checks passed
@designcode designcode deleted the iam/user-management branch February 20, 2026 13:17
@github-actions
Copy link

🎉 This PR is included in version 1.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions
Copy link

🎉 This PR is included in version 2.14.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants