Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

복수개의 TKS Role을 갖도록 User Model 수정 #324

Merged
merged 7 commits into from
Apr 4, 2024

Conversation

cho4036
Copy link
Contributor

@cho4036 cho4036 commented Apr 2, 2024

"User" 구조체 내부 단수 Role -> 복수 Roles 를 가질 수 있도록 개편되었습니다. "User" 구조체를 사용하는 FrontEnd, CLI 모두 해당 부분에 대한 반영이 필요합니다.

@Siyeop 시엽님, 해당 변경으로 인해 FrontEnd쪽에서 빠르게 반영해야하는 이슈가 있는지 한번 확인 부탁드립니다.
대표적으로 영향 받는 API는 Login과 User Read API(Get List) 들이 있습니다.

Login 기존 응답 형식

    "user": {
        "accountId": "admin",
        ...
        "role": {
            "roleId": "23618210-81c7-4b8f-89ea-764b8bf96fd5",
            "roleName": "user"
        },
        ...

Login 변경된 응답 형식

{
    "user": {
        "accountId": "admin",
        ...
        "roles": [
            {
                "id": "9a9f9da7-40ef-46cc-9dc6-70ad7eb70e92",
                "name": "admin"
            },
            {
                "id": "23618210-81c7-4b8f-89ea-764b8bf96fd5",
                "name": "user"
            }
        ],
        ...

List User 기존 응답 형식

{
    "users": [
        {
            "id": "a4cee97c-943d-44df-92a1-a770c30eed5f",
            ...
            "role": {
                "id": "23618210-81c7-4b8f-89ea-764b8bf96fd5",
                "name": "user",
                ...
                },
            ...
        },

List User 변경된 응답 형식

{
    "users": [
        {
            "id": "a4cee97c-943d-44df-92a1-a770c30eed5f",
            ...
            "roles": [
                {
                    "id": "9a9f9da7-40ef-46cc-9dc6-70ad7eb70e92",
                    "name": "admin"
                },
                {
                    "id": "23618210-81c7-4b8f-89ea-764b8bf96fd5",
                    "name": "user"
                }
            ],
            ...
        },

@cho4036 cho4036 marked this pull request as draft April 2, 2024 04:52
@cho4036 cho4036 force-pushed the user_model_change branch from 5884a68 to f753f63 Compare April 3, 2024 06:17
@cho4036 cho4036 marked this pull request as ready for review April 3, 2024 06:21
@cho4036 cho4036 requested review from ktkfree, seungkyua and Siyeop April 3, 2024 06:42
Copy link
Member

@Siyeop Siyeop left a comment

Choose a reason for hiding this comment

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

변경해주신대로 적용하면,
화면에서 로그인이 제대로 안되긴 할텐데
일단 머지하고 바로 고치겠습니다.

고생 많으셨습니다.

나연 따봉

@Siyeop Siyeop merged commit 3565738 into openinfradev:develop Apr 4, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants