3 Commits (357827a8812b736dd47045977a306cb9b2b18916)

Author SHA1 Message Date
veypi 56d87ec18a test: Update tests for scoped RBAC and remove org tests
- Remove org-related test cases from edge_case_test.go
    - Remove OrgResp type from main_test.go
    - Update none_auth_test removing org endpoints
    - Add permission grants in OAuth tests for proper access control
    - Fix race condition tests with retry logic for SQLite locking
    - Update resource_perm_test to accept 401 or 403 status codes
    - Add new role_access_test.go for role API permission testing
    - Add new scoped_auth_test.go for scoped permission testing
3 weeks 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 month 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 month ago