- add GET/PUT /user/me endpoints for profile viewing and editing
- add PUT /user/me/password endpoint for password changes
- add GET /user/me/builds skeleton endpoint for future CustomModification
- add user_role table with ROLE_USER, ROLE_ADMIN, and ROLE_SUPER_USER roles
- add @RequiresRole annotation with custom AuthorizationManager enforcement
- extend User entity with nickname, avatarUrl, emailVerified, enabled,
createdAt, and updatedAt columns
- load user roles into SecurityContext authorities via TokenAuthenticationFilter
- add @CurrentUser annotation and argument resolver for controller injection
- add PUT/DELETE /admin/users/{id}/roles for SUPER_USER role management
- add V6 and V7 Flyway migrations for schema changes
Closes #5
Closes #8
7 lines
179 B
SQL
7 lines
179 B
SQL
CREATE TABLE user_role
|
|
(
|
|
user_id BIGINT NOT NULL REFERENCES app_user (id),
|
|
role VARCHAR(32) NOT NULL,
|
|
CONSTRAINT user_role_pkey PRIMARY KEY (user_id, role)
|
|
);
|