mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
ACS-5506 CR fixes applied
This commit is contained in:
@@ -31,7 +31,8 @@ public class GroupsTests extends RestTest
|
|||||||
@Test(groups = { TestGroup.REST_API, TestGroup.GROUPS, TestGroup.SANITY })
|
@Test(groups = { TestGroup.REST_API, TestGroup.GROUPS, TestGroup.SANITY })
|
||||||
@TestRail(section = { TestGroup.REST_API, TestGroup.NODES }, executionType = ExecutionType.SANITY,
|
@TestRail(section = { TestGroup.REST_API, TestGroup.NODES }, executionType = ExecutionType.SANITY,
|
||||||
description = "Verify creation, listing, updating and deletion of groups.")
|
description = "Verify creation, listing, updating and deletion of groups.")
|
||||||
public void createListUpdateAndDeleteGroup() {
|
public void createListUpdateAndDeleteGroup()
|
||||||
|
{
|
||||||
String groupName = "ZtestGroup" + UUID.randomUUID();
|
String groupName = "ZtestGroup" + UUID.randomUUID();
|
||||||
String subGroupName = "ZtestSubgroup" + UUID.randomUUID();
|
String subGroupName = "ZtestSubgroup" + UUID.randomUUID();
|
||||||
String groupDescription = "ZtestGroup description" + UUID.randomUUID();
|
String groupDescription = "ZtestGroup description" + UUID.randomUUID();
|
||||||
@@ -111,7 +112,8 @@ public class GroupsTests extends RestTest
|
|||||||
@Test(groups = { TestGroup.REST_API, TestGroup.GROUPS, TestGroup.SANITY })
|
@Test(groups = { TestGroup.REST_API, TestGroup.GROUPS, TestGroup.SANITY })
|
||||||
@TestRail(section = { TestGroup.REST_API, TestGroup.NODES }, executionType = ExecutionType.SANITY,
|
@TestRail(section = { TestGroup.REST_API, TestGroup.NODES }, executionType = ExecutionType.SANITY,
|
||||||
description = "Verify creation, listing(only for person) and deletion of group memberships. ")
|
description = "Verify creation, listing(only for person) and deletion of group memberships. ")
|
||||||
public void createListDeleteGroupMembership() {
|
public void createListDeleteGroupMembership()
|
||||||
|
{
|
||||||
String groupName = "ZtestGroup" + UUID.randomUUID();
|
String groupName = "ZtestGroup" + UUID.randomUUID();
|
||||||
JsonObject groupBody = Json.createObjectBuilder().add("id", groupName).add("displayName", groupName).build();
|
JsonObject groupBody = Json.createObjectBuilder().add("id", groupName).add("displayName", groupName).build();
|
||||||
String groupBodyCreate = groupBody.toString();
|
String groupBodyCreate = groupBody.toString();
|
||||||
|
@@ -379,11 +379,13 @@ public class GroupsImpl implements Groups
|
|||||||
String displayNameFilter = groupsFilter.getDisplayNameFilter();
|
String displayNameFilter = groupsFilter.getDisplayNameFilter();
|
||||||
PagingResults<AuthorityInfo> pagingResult;
|
PagingResults<AuthorityInfo> pagingResult;
|
||||||
|
|
||||||
if (isRootParam != null || displayNameFilter != null)
|
// Don't use canned queries when fetching authorities with description
|
||||||
|
// if better performance is requested for loading descriptions we can add canned queries in the future
|
||||||
|
if (isRootParam != null || displayNameFilter != null || includeDescription)
|
||||||
{
|
{
|
||||||
List<AuthorityInfo> groupList;
|
List<AuthorityInfo> groupList;
|
||||||
|
|
||||||
if (isRootParam != null && isRootParam)
|
if ((isRootParam != null && isRootParam) || includeDescription)
|
||||||
{
|
{
|
||||||
// Limit the post processing work by using the already loaded
|
// Limit the post processing work by using the already loaded
|
||||||
// list of root authorities.
|
// list of root authorities.
|
||||||
|
@@ -392,7 +392,7 @@ public class AuthorityDAOImpl implements AuthorityDAO, NodeServicePolicies.Befor
|
|||||||
props.put(ContentModel.PROP_NAME, DigestUtils.md5Hex(name));
|
props.put(ContentModel.PROP_NAME, DigestUtils.md5Hex(name));
|
||||||
props.put(ContentModel.PROP_AUTHORITY_NAME, name);
|
props.put(ContentModel.PROP_AUTHORITY_NAME, name);
|
||||||
props.put(ContentModel.PROP_AUTHORITY_DISPLAY_NAME, authorityDisplayName);
|
props.put(ContentModel.PROP_AUTHORITY_DISPLAY_NAME, authorityDisplayName);
|
||||||
if (MapUtils.isNotEmpty(properties))
|
if (properties != null)
|
||||||
{
|
{
|
||||||
props.putAll(properties);
|
props.putAll(properties);
|
||||||
}
|
}
|
||||||
@@ -1452,9 +1452,9 @@ public class AuthorityDAOImpl implements AuthorityDAO, NodeServicePolicies.Befor
|
|||||||
{
|
{
|
||||||
return Pair.nullPair();
|
return Pair.nullPair();
|
||||||
}
|
}
|
||||||
Serializable displayName = nodeService.getProperty(ref, ContentModel.PROP_AUTHORITY_DISPLAY_NAME);
|
String displayName = getAuthorityDisplayName(authorityName);
|
||||||
Serializable description = nodeService.getProperty(ref, ContentModel.PROP_DESCRIPTION);
|
Serializable description = nodeService.getProperty(ref, ContentModel.PROP_DESCRIPTION);
|
||||||
return new Pair<>(DefaultTypeConverter.INSTANCE.convert(String.class, displayName), DefaultTypeConverter.INSTANCE.convert(String.class, description));
|
return new Pair<>(displayName, DefaultTypeConverter.INSTANCE.convert(String.class, description));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -1465,8 +1465,10 @@ public class AuthorityDAOImpl implements AuthorityDAO, NodeServicePolicies.Befor
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
nodeService.setProperty(ref, ContentModel.PROP_AUTHORITY_DISPLAY_NAME, authorityDisplayName);
|
Map<QName, Serializable> properties = new HashMap<>();
|
||||||
nodeService.setProperty(ref, ContentModel.PROP_DESCRIPTION, description);
|
properties.put(ContentModel.PROP_AUTHORITY_DISPLAY_NAME, authorityDisplayName);
|
||||||
|
properties.put(ContentModel.PROP_DESCRIPTION, description);
|
||||||
|
nodeService.setProperties(ref, properties);
|
||||||
}
|
}
|
||||||
|
|
||||||
public NodeRef getOrCreateZone(String zoneName)
|
public NodeRef getOrCreateZone(String zoneName)
|
||||||
|
Reference in New Issue
Block a user