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

feat(User): Add new endpoints to get/update requesting user profile #2258

Merged
merged 1 commit into from
Jan 17, 2024

Conversation

hoangnt2
Copy link
Contributor

@hoangnt2 hoangnt2 commented Jan 3, 2024

Add new endpoints to get/update requesting user profile

How To Test?

1. Get requesting user's profile

{
    "email": "[email protected]",
    "userGroup": "ADMIN",
    "externalid": "sw3607",
    "department": "DEPARTMENT",
    "wantsMailNotification": true,
    "notificationPreferences": {
        "releaseCONTRIBUTORS": true,
        "componentCREATED_BY": false,
        "releaseCREATED_BY": false,
        "moderationREQUESTING_USER": false,
        "projectPROJECT_OWNER": false,
        "moderationMODERATORS": true,
        "releaseSUBSCRIBERS": true,
        "componentMODERATORS": true,
        "projectMODERATORS": false,
        "releaseROLES": true,
        "componentROLES": true,
        "projectLEAD_ARCHITECT": true,
        "componentCOMPONENT_OWNER": true,
        "projectSECURITY_RESPONSIBLES": false,
        "clearingREQUESTING_USER": false,
        "projectCONTRIBUTORS": false,
        "componentSUBSCRIBERS": false,
        "projectPROJECT_RESPONSIBLE": false,
        "releaseMODERATORS": false
    },
    "formerEmailAddresses": [
        "[email protected]"
    ],
    "secondaryDepartmentsAndRoles": {
        "DEPARTMENT3": [
            "SECURITY_ADMIN"
        ],
        "DEPARTMENT2": [
            "ECC_ADMIN"
        ]
    },
    "deactivated": false,
    "fullName": "Test Admin",
    "givenName": "Test",
    "lastName": "Admin",
    "_links": {
        "self": {
            "href": "http://localhost:8080/resource/api/users/byid/ba3331bd558a4e0c85c13f99f9a58af9"
        }
    }
}

2. Update requesting user's profile (This only supports update email notification configuration)

 {
    "wantsMailNotification": true,
    "notificationPreferences": {
        "releaseCONTRIBUTORS": true,
        "componentCREATED_BY": false,
        "releaseCREATED_BY": false,
        "moderationREQUESTING_USER": false,
        "projectPROJECT_OWNER": false,
        "moderationMODERATORS": true,
        "releaseSUBSCRIBERS": true,
        "componentMODERATORS": true,
        "projectMODERATORS": false,
        "releaseROLES": true,
        "componentROLES": true,
        "projectLEAD_ARCHITECT": true,
        "componentCOMPONENT_OWNER": true,
        "projectSECURITY_RESPONSIBLES": false,
        "clearingREQUESTING_USER": false,
        "projectCONTRIBUTORS": false,
        "componentSUBSCRIBERS": false,
        "projectPROJECT_RESPONSIBLE": false,
        "releaseMODERATORS": false
    }
}
  • Expected
    Email notification configuration is updated successfully

@ag4ums ag4ums added needs code review needs general test This is general testing, meaning that there is no org specific issue to check for REST New-UI Level for the API and UI level changes for the new-ui labels Jan 3, 2024
@keerthi-bl
Copy link
Contributor

FYI, I am testing this PR.

@keerthi-bl
Copy link
Contributor

Test successful.

image

image

@KoukiHama KoukiHama removed the needs general test This is general testing, meaning that there is no org specific issue to check for label Jan 5, 2024
@hoangnt2 hoangnt2 force-pushed the release/user_preferences branch from f37e749 to bcd600c Compare January 9, 2024 09:50
@rudra-superrr rudra-superrr self-assigned this Jan 17, 2024
@rudra-superrr
Copy link
Contributor

Code looks good.

@rudra-superrr rudra-superrr added ready ready to merge and removed needs code review labels Jan 17, 2024
@ag4ums ag4ums merged commit ddfbe48 into eclipse-sw360:main Jan 17, 2024
2 checks passed
@hoangnt2 hoangnt2 deleted the release/user_preferences branch December 12, 2024 06:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New-UI Level for the API and UI level changes for the new-ui ready ready to merge REST
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants