Sync with the master branch #172

Merged
amalka.subasinghe merged 79 commits from tcdlpds/device-mgt-core:sync-master into apim420 1 year ago
tcdlpds commented 1 year ago
Owner
There is no content yet.
tcdlpds added 72 commits 1 year ago
d34adaae96
Fix issue with Nginx not recognizing the SCEP client certificate (#105)
19ce7d6fac
Add try it now feature (#99)
cf2bd5e935
Add custom loggers (#136)
6109f58c49
Remove unwanted check in billing logic
498dc7ae34
HierarchicalGrouping (#153)
3616245ae6
Improve app visibility restricting functionality
87de656571
Add footer config template
38b8c8d7b1
Grouping Improvements (#169)
amalka.subasinghe reviewed 1 year ago
</Import-Package>
<Export-Package>
!io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.internal,
!io.entgra.device.mgt.core.transport.mgt.email.sender.core.internal,

please check this.
should be analytics.mgt.grafana.proxy

please check this. should be analytics.mgt.grafana.proxy
Poster
Owner

Found the exact issue and fixed with the following PR [1]

[1] - #175

Found the exact issue and fixed with the following PR [1] [1] - https://repository.entgra.net/community/device-mgt-core/pulls/175
amalka.subasinghe reviewed 1 year ago
amalka.subasinghe reviewed 1 year ago
this.changeLifecycleState(applicationReleaseDTO, lifecycleChanger);
}
}
if (applicationDTO.getType().equals("ENTERPRISE") || applicationDTO.getType().equals("PUBLIC") ) {

NPE can be thrown

NPE can be thrown
amalka.subasinghe reviewed 1 year ago
List<Metadata> allMetadata;
allMetadata = APIUtil.getMetadataManagementService().retrieveAllMetadata();
if (allMetadata != null && !allMetadata.isEmpty()) {
for(Metadata metadata : allMetadata){

no code formattings

no code formattings
amalka.subasinghe reviewed 1 year ago
entry.getKey(), action, properties);
activityList.add(activity);
for (DeviceIdentifier identifier : deviceIdentifiers) {
log.info(String.format("Web app %s triggered", action), appInstallLogContextBuilder.setAppId(String.valueOf(applicationDTO.getId())).setAppName(applicationDTO.getName()).setAppType(applicationDTO.getType()).setSubType(subType).setTenantId(tenantId).setTenantDomain(tenantDomain).setDevice(String.valueOf(identifier)).setUserName(username).setAction(action).build());

good if you can imporve the readability of these lines

good if you can imporve the readability of these lines
amalka.subasinghe reviewed 1 year ago
if (limit == 0){
limit = Constants.DEFAULT_PAGE_LIMIT;
}
if (domain != null && !domain.isEmpty()) {

can use string utils

can use string utils
Poster
Owner

It is not possible to use StingUtils since it is deprecated in Java 11, hence uses Guava Strings.

It is not possible to use StingUtils since it is deprecated in Java 11, hence uses Guava Strings.
JSONObject jsonObject = (JSONObject) parser.parse(metaValue);
boolean decision = (boolean) jsonObject.get(Constants.IS_USER_ABLE_TO_VIEW_ALL_ROLES);
if (decision) {
if (userStore == null || "".equals(userStore)){

can use stringutils

can use stringutils
}
for (DeviceIdentifier deviceId : authorizedDeviceIds) {
device = getDevice(deviceId);
log.info("Operation added", deviceConnectivityLogContextBuilder.setDeviceId(String.valueOf(device.getId())).setDeviceType(deviceType).setActionTag("ADD_OPERATION").setTenantDomain(tenantDomain).setTenantId(tenantId).setUserName(initiatedBy).setOperationCode(operationCode).build());

good to imporve the readability

good to imporve the readability
break;
}
log.info("Device Connected", deviceConnectivityLogContextBuilder.setDeviceId(deviceId.getId()).setDeviceType(deviceId.getType()).setActionTag("PENDING_OPERATION").setTenantDomain(tenantDomain).setTenantId(String.valueOf(tenantId)).setUserName(userName).build());

redability need to be improved

redability need to be improved
device.getType() + " upon the user '" + device.getEnrolmentInfo().getOwner() +
"'");
}
log.info("Device enrolled successfully", deviceEnrolmentLogContextBuilder.setDeviceId(String.valueOf(existingDevice.getId())).setDeviceType(String.valueOf(existingDevice.getType())).setOwner(newEnrolmentInfo.getOwner()).setOwnership(String.valueOf(newEnrolmentInfo.getOwnership())).setTenantID(String.valueOf(tenantId)).setTenantDomain(tenantDomain).setUserName(userName).build());

readability can be improved . please check all places

readability can be improved . please check all places
newParentPath = DeviceGroupConstants.HierarchicalGroup.SEPERATOR;
}
childrenGroup.setParentPath(newParentPath);
if (!newParentPath.equals(DeviceGroupConstants.HierarchicalGroup.SEPERATOR)) {

NPE can be thrown

NPE can be thrown
tcdlpds added 1 commit 1 year ago
tcdlpds added 5 commits 1 year ago
tcdlpds added 1 commit 1 year ago
amalka.subasinghe approved these changes 1 year ago
amalka.subasinghe merged commit b249b2435f into apim420 1 year ago

Reviewers

amalka.subasinghe approved these changes 1 year ago
The pull request has been merged as b249b2435f.
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: community/device-mgt-core#172
Loading…
There is no content yet.