Skip to content

Comments

Adding service users#661

Merged
javuto merged 2 commits intomainfrom
service-users-admin
Aug 8, 2025
Merged

Adding service users#661
javuto merged 2 commits intomainfrom
service-users-admin

Conversation

@javuto
Copy link
Collaborator

@javuto javuto commented Aug 8, 2025

  • Adding service users to osctrl-admin and osctrl-api
  • Support to add service users using osctrl-cli
  • Fixed capitalization errors highlighted by go staticcheck
  • Fixes in unit tests

@javuto javuto requested a review from Copilot August 8, 2025 13:42
@javuto javuto added osctrl-api osctrl-api related changes osctrl-admin osctrl-admin related changes osctrl-cli osctrl-cli related changes labels Aug 8, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 Service boolean field to the AdminUser struct 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

@javuto javuto merged commit 253f17c into main Aug 8, 2025
54 checks passed
@javuto javuto deleted the service-users-admin branch August 8, 2025 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

osctrl-admin osctrl-admin related changes osctrl-api osctrl-api related changes osctrl-cli osctrl-cli related changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant