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

LR-556 Added validation for organisationid #1246

Closed
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
550b2f8
Issue #LR-676 feat: User Delete - ownership transfer api
BharathwajShankar Dec 18, 2023
a132bd9
Issue #LR-676 feat: User Delete - ownership transfer api - unittestcase
BharathwajShankar Dec 19, 2023
d9c3efb
Issue #LR-676 feat: User Delete - ownership transfer api - unittestcase
BharathwajShankar Dec 19, 2023
a7db399
Issue #LR-676 feat: User Delete - ownership transfer api - unittestcase
BharathwajShankar Dec 19, 2023
3728802
Issue #LR-676 feat: User Delete - ownership transfer api - unittestcase
BharathwajShankar Dec 19, 2023
abc52c1
Merge branch 'release-7.0.0' of https://github.com/Sunbird-Lern/usero…
BharathwajShankar Dec 19, 2023
bba7bbc
Issue #LR-676 feat: User Delete - ownership transfer api - unittestcase
BharathwajShankar Dec 19, 2023
57437fc
Issue #LR-676 feat: User Delete - ownership transfer api - unittestcase
BharathwajShankar Dec 19, 2023
c598f67
Issue #LR-676 feat: User Delete - ownership transfer api - unittestcase
BharathwajShankar Dec 20, 2023
eecce11
Issue #LR-676 feat: User Delete - ownership transfer api - unittestcase
BharathwajShankar Dec 26, 2023
5152ec1
Issue #LR-676 feat: User Delete - ownership transfer api - unittestcase
BharathwajShankar Dec 27, 2023
a15a84b
Issue #LR-676 feat: User Delete - ownership transfer api - unittestcase
BharathwajShankar Dec 27, 2023
31c17aa
Issue #LR-676 feat: User Delete - ownership transfer api - unittestcase
BharathwajShankar Dec 27, 2023
993642e
Issue #LR-676 feat: User Delete - ownership transfer api - unittestcase
BharathwajShankar Dec 27, 2023
7cb80d6
Issue #LR-676 feat: User Delete - ownership transfer api - unittestcase
BharathwajShankar Jan 2, 2024
7830b4b
Issue #LR-676 feat: User Delete - ownership transfer api - unittestcase
BharathwajShankar Jan 2, 2024
81675b1
Issue #LR-676 feat: User Delete - ownership transfer api - unittestcase
BharathwajShankar Jan 2, 2024
b541498
Issue #LR-676 feat: User Delete - ownership transfer api - unittestcase
BharathwajShankar Jan 2, 2024
b52f0b8
Issue #LR-676 feat: User Delete - ownership transfer api - unittestcase
BharathwajShankar Jan 2, 2024
4026be0
Issue #LR-676 feat: User Delete - ownership transfer api - unittestcase
BharathwajShankar Jan 2, 2024
49f71de
Issue #LR-676 feat: User Delete - ownership transfer api - unittestcase
BharathwajShankar Jan 3, 2024
da12385
Issue #LR-676 feat: User Delete - ownership transfer api - unittestcase
BharathwajShankar Jan 3, 2024
64c5490
Issue #LR-676 feat: User Delete - ownership transfer api - unittestcase
BharathwajShankar Jan 8, 2024
1d566d6
Issue #LR-676 feat: User Delete - ownership transfer api - unittestcase
BharathwajShankar Jan 9, 2024
8100c2d
Issue #LR-676 feat: User Delete - ownership transfer api - unittestcase
BharathwajShankar Jan 9, 2024
25b9870
Issue #LR-676 feat: User Delete - ownership transfer api - unittestcase
BharathwajShankar Jan 10, 2024
175eddf
Issue #LR-676 feat: User Delete - ownership transfer api - unittestcase
BharathwajShankar Jan 10, 2024
8eabd9f
Issue #LR-676 feat: User Delete - ownership transfer api - unittestcase
BharathwajShankar Jan 24, 2024
e009cc1
Merge branch 'release-7.0.0' of https://github.com/Sunbird-Lern/usero…
BharathwajShankar Jan 24, 2024
af01e05
Issue #LR-676 feat: User Delete - ownership transfer api - unittestcase
BharathwajShankar Jan 24, 2024
2dd218f
Merge branch 'release-7.0.0' of https://github.com/Sunbird-Lern/usero…
BharathwajShankar Feb 27, 2024
d6538e6
Merge branch 'release-8.0.0' of https://github.com/Sunbird-Lern/usero…
BharathwajShankar Feb 27, 2024
469f27e
Issue #LR-676 feat: User Delete - ownership transfer api - unittestcase
BharathwajShankar Feb 27, 2024
98c4eec
Issue #LR-676 feat: User Delete - ownership transfer api - adding new…
BharathwajShankar Mar 18, 2024
031a2cb
LR-676 - added Missing topic related settings
BharathwajShankar Mar 20, 2024
500c82b
LR-676 - added Missing topic related settings
BharathwajShankar Mar 20, 2024
30bc54b
LR-676 - added Missing topic related settings and topic info from cache
BharathwajShankar Apr 1, 2024
2a76b84
Merge branch 'release-8.0.0' of https://github.com/Sunbird-Lern/usero…
BharathwajShankar Apr 8, 2024
0cf1af8
LR-676 - added Missing topic related settings and topic info from cache
BharathwajShankar Apr 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public void onReceive(Request request) throws Throwable {
}

private void handleOwnershipTransfer(Request request) {
validateOrganizationId(request.getRequest());
validateUserDetails(request.getRequest(), request.getRequestContext());
String userId = (String) ((Map<String, Object>) request.getRequest().get(JsonKey.ACTION_BY))
.get(JsonKey.USER_ID);
Expand All @@ -48,6 +49,13 @@ private void handleOwnershipTransfer(Request request) {
sender().tell(response, self());
}

private void validateOrganizationId(Map<String, Object> requestData) {
if (!requestData.containsKey(JsonKey.ORGANISATION_ID) ||
StringUtils.isBlank((String) requestData.get(JsonKey.ORGANISATION_ID))) {
throwInvalidRequestDataException("Organization ID is mandatory in the request.");
}
}

private void validateUserDetails(Map<String, Object> data, RequestContext requestContext) {
validateAndProceed(data, JsonKey.ACTION_BY, requestContext);
validateAndProceed(data, JsonKey.FROM_USER, requestContext);
Expand Down
Loading