Skip to content

Shahar/per 12589 golang sdk getusersfortenant - #68

Merged
SRaz-Sw merged 6 commits into
masterfrom
shahar/per-12589-golang-sdk-getusersfortenant
Jul 2, 2025
Merged

Shahar/per 12589 golang sdk getusersfortenant#68
SRaz-Sw merged 6 commits into
masterfrom
shahar/per-12589-golang-sdk-getusersfortenant

Conversation

@SRaz-Sw

@SRaz-Sw SRaz-Sw commented Jul 2, 2025

Copy link
Copy Markdown
Contributor

Get Tenant's Users

SRaz-Sw added 2 commits July 2, 2025 10:08
🏗️ Architecture
The implementation leverages the existing generated OpenAPI client:
The OpenAPI method ListTenantUsers was already generated from the API spec
Our implementation is a simple, clean wrapper that:
Handles pagination validation
Manages context and configuration
Provides proper error handling and logging
Returns the data in the expected format (users.GetData())
🧪 Testing
✅ Compilation: All code compiles without errors
✅ Integration Test: Added to existing test suite
✅ Pattern Compliance: Follows exact patterns used throughout the codebase
📚 API Endpoint
The feature calls the Permit.io REST API:
Apply to tenants.go
users
Response: Paginated list of users within the specified tenant, including user details like key, email, first name, last name, and attributes.
The implementation is minimal, clean, and follows all the best practices established in the codebase! 🎉
@SRaz-Sw
SRaz-Sw requested a review from RazcoDev July 2, 2025 07:09
Comment thread pkg/tests/integration_test.go Outdated
Comment thread PROJECT_ANALYSIS.md Outdated
Deleted detailed assertions and edge case tests for tenant user listing and pagination from the integration test. This streamlines the test suite by focusing on core permission checks and reduces coupling to user creation logic.
@SRaz-Sw
SRaz-Sw merged commit 9d29cff into master Jul 2, 2025
2 of 4 checks passed
@SRaz-Sw
SRaz-Sw deleted the shahar/per-12589-golang-sdk-getusersfortenant branch July 2, 2025 14:39
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