Skip to content

Commit

Permalink
HELLODATA-1881 - add region; fix permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
Slawomir Wieczorek committed Dec 13, 2024
1 parent 181ea20 commit bc780d5
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ private SubsystemUserUpdate getSubsystemUserUpdate(UserRepresentation representa
SubsystemUserUpdate createUser = new SubsystemUserUpdate();
createUser.setFirstName(representation.getFirstName());
createUser.setLastName(representation.getLastName());
createUser.setUsername(representation.getUsername());
createUser.setUsername(representation.getUsername().toLowerCase(Locale.ROOT));
createUser.setEmail(representation.getEmail().toLowerCase(Locale.ROOT));
createUser.setActive(representation.isEnabled());
return createUser;
Expand All @@ -522,11 +522,7 @@ private void updateContextRoles(UUID userId, UpdateContextRolesForUserDto update
}
setRoleForAllRemainingDataDomainsToNone(updateContextRolesForUserDto, userEntity);
}
if (updateContextRolesForUserDto.getBusinessDomainRole().getName().equalsIgnoreCase(HdRoleName.HELLODATA_ADMIN.name())) {
userEntity.setSuperuser(true);
} else {
userEntity.setSuperuser(false);
}
userEntity.setSuperuser(updateContextRolesForUserDto.getBusinessDomainRole().getName().equalsIgnoreCase(HdRoleName.HELLODATA_ADMIN.name()));
userRepository.save(userEntity);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public static class S3Connection {
private String contextKey;
private String endpoint;
private String bucket;
private String region;
private String accessKey;
private String accessSecret;
private boolean forcePathStyle;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public void createGroup(String dataDomainKey, String dataDomainName, String grou

GroupUserSettings groupUserSettings = new GroupUserSettings();
Map<String, List<Permission>> permissionsMap = new HashMap<>();
permissionsMap.put(vf.getVirtualPath() + "/*", permissions);
permissionsMap.put(vf.getVirtualPath() + "/", permissions);
groupUserSettings.setPermissions(permissionsMap);
group.setUserSettings(groupUserSettings);

Expand Down Expand Up @@ -185,6 +185,7 @@ private VirtualFolder createVirtualFolder(String dataDomainKey, String dataDomai
s3Config.setEndpoint(s3Connection.getEndpoint());
s3Config.forcePathStyle(s3Connection.isForcePathStyle());
s3Config.setBucket(s3Connection.getBucket());
s3Config.setRegion(s3Connection.getRegion());
FilesystemConfig filesystemConfig = new FilesystemConfig();
filesystemConfig.s3config(s3Config);
filesystemConfig.setProvider(FsProviders.NUMBER_1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,14 @@ hello-data:
- context-key: Default_Data_Domain
endpoint: http://minio:9000
bucket: default-data-domain #lower case context key, dashes only
region: eu-central-2
access-key: minioadmin
access-secret: minioadmin
force-path-style: true
- context-key: Extra_Data_Domain
endpoint: http://minio:9000
bucket: extra-data-domain #lower case context key, dashes only
region: eu-central-2
access-key: minioadmin
access-secret: minioadmin
force-path-style: true
Expand Down

0 comments on commit bc780d5

Please sign in to comment.