Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This pull request adds service user functionality to the osctrl project, allowing for the creation and management of service accounts alongside regular users. The changes include backend support for service users, CLI interface updates, UI enhancements to display service users separately, and unit test fixes to accommodate the new functionality.
Key changes:
- Added a
Serviceboolean field to theAdminUserstruct to distinguish service accounts from regular users - Updated user management methods to support service user creation and modification
- Enhanced the admin UI to display service users in a separate table with appropriate controls
- Fixed capitalization inconsistencies in error messages
Reviewed Changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pkg/users/users.go | Added Service field to AdminUser struct and methods for service user management |
| pkg/users/users_test.go | Updated unit tests to accommodate new Service field and refactored test structure |
| pkg/users/permissions_test.go | Refactored permission tests to use shared setup function |
| cmd/cli/user.go | Added service flag support for user creation and modification |
| cmd/cli/main.go | Added CLI flags for service account management |
| cmd/admin/templates/users.html | Enhanced UI to display service users separately with appropriate controls |
| cmd/admin/static/js/users.js | Added JavaScript functions for service user management |
| cmd/admin/handlers/types-templates.go | Updated template data structure to support separate user lists |
| cmd/admin/handlers/types-requests.go | Added Service field to user request structure |
| cmd/admin/handlers/templates.go | Updated handler to fetch and separate service/system users |
| cmd/admin/handlers/post.go | Added service user creation and modification endpoints |
| cmd/admin/auth.go | Updated SAML user creation to set service flag |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
osctrl-adminandosctrl-apiosctrl-cligo staticcheck