4 Commits (b2b24df82e51839416ff5e8c330158f39942e7af)

Author SHA1 Message Date
veypi 7f7591cf6d test: Add integration tests for org, role and oauth client
- Add OAuth client CRUD and access control tests
    - Add organization CRUD, tree and access control tests
    - Add role CRUD, access control and system role protection tests
    - Remove user:read permission from default user role
7 days ago
veypi b0322047cd feat: Restrict user APIs to admins and add public user search
- Add /api/auth/users endpoint for authenticated users to search other users
    - Only return public info (id, username, nickname, avatar) in search results
    - Change /api/user routes to require user:admin permission instead of user:read
    - Update auth tests to use /api/auth/me for self updates
    - Add tests for new user search endpoint
1 week ago
veypi b8c894b5cf test: Refactor test infrastructure to use in-memory SQLite database
- Add tests/README.md with comprehensive documentation for running and adding tests
    - Change TestDBFile from file-based 'test.db' to in-memory 'file::memory:?cache=shared'
    - Remove file cleanup in setup() and teardown() functions since memory database requires no cleanup
    - Simplify setup() by removing comments and streamlining database configuration
1 week ago
veypi 01620b3185 refactor(test): restructure integration tests for auth and permissions
- Move and split 'auth/auth_test.go' into the 'tests/' directory
    - Add 'tests/main_test.go' for global test suite setup
    - Add 'tests/helpers_test.go' for shared test utilities
    - Create separate test files for different auth scenarios ('auth_test.go', 'none_auth_test.go')
    - Add focused tests for org permissions and middleware ('org_permission_test.go', 'resource_perm_test.go', 'org_load_middleware_test.go')
1 week ago