Apply formatting

This commit is contained in:
Marcus Hert Da Coregio
2024-01-24 10:28:39 -03:00
parent 64eb62026c
commit 923b627eda
35 changed files with 175 additions and 110 deletions

View File

@@ -101,8 +101,9 @@ public class DataSourcePopulator implements InitializingBean {
this.template.execute("INSERT INTO AUTHORITIES VALUES('jane','ROLE_USER');");
// Now create an ACL entry for the root directory
SecurityContextHolder.getContext().setAuthentication(new UsernamePasswordAuthenticationToken("rod", "ignored",
AuthorityUtils.createAuthorityList(("ROLE_IGNORED"))));
SecurityContextHolder.getContext()
.setAuthentication(new UsernamePasswordAuthenticationToken("rod", "ignored",
AuthorityUtils.createAuthorityList(("ROLE_IGNORED"))));
addPermission(this.documentDao, Directory.ROOT_DIRECTORY, "ROLE_USER", LEVEL_GRANT_WRITE);

View File

@@ -47,7 +47,7 @@ public class SecureDocumentDaoImpl extends DocumentDaoImpl implements SecureDocu
public String[] getUsers() {
return getJdbcTemplate().query(SELECT_FROM_USERS, (rs, rowNumber) -> rs.getString("USERNAME"))
.toArray(new String[] {});
.toArray(new String[] {});
}
public void create(AbstractElement element) {

View File

@@ -100,7 +100,7 @@ public class DmsIntegrationTests {
protected void process(String username, String password, boolean shouldBeFiltered) {
SecurityContextHolder.getContext()
.setAuthentication(new UsernamePasswordAuthenticationToken(username, password));
.setAuthentication(new UsernamePasswordAuthenticationToken(username, password));
System.out.println("------ Test for username: " + username + " ------");
AbstractElement[] rootElements = this.documentDao.findElements(Directory.ROOT_DIRECTORY);
assertThat(rootElements).hasSize(3);
@@ -140,7 +140,7 @@ public class DmsIntegrationTests {
if (shouldBeFiltered) {
assertThat(nonHomeConfidentialDir).withFailMessage("Found confidential directory when we should not have")
.isNull();
.isNull();
}
else {
System.out.println("Inaccessible dir....: " + nonHomeConfidentialDir.getFullName());

View File

@@ -46,7 +46,7 @@ public class SecureDmsIntegrationTests extends DmsIntegrationTests {
// and
// File
assertThat(this.jdbcTemplate.queryForObject("select count(id) from ACL_OBJECT_IDENTITY", Integer.class))
.isEqualTo(100);
.isEqualTo(100);
assertThat(this.jdbcTemplate.queryForObject("select count(id) from ACL_ENTRY", Integer.class)).isEqualTo(115);
}