mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Fix failing unit test
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@11019 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -661,7 +661,7 @@ public class SiteServiceImpl implements SiteService, SiteModel
|
||||
}
|
||||
|
||||
// If ...
|
||||
// -- the current user has change permissions
|
||||
// -- the current user has change permissions rights on the site
|
||||
// or
|
||||
// -- the site is public and
|
||||
// -- the user is ourselves and
|
||||
@@ -723,10 +723,8 @@ public class SiteServiceImpl implements SiteService, SiteModel
|
||||
// Get the user's current role
|
||||
final String currentRole = getMembersRole(shortName, userName);
|
||||
|
||||
if (currentRole == null)
|
||||
{
|
||||
// Do nothing if the role of the user is not being changed
|
||||
if (role.equals(currentRole) == false)
|
||||
if (currentRole == null || role.equals(currentRole) == false)
|
||||
{
|
||||
// Determine whether the site is private or not
|
||||
boolean isPublic = isSitePublic(siteNodeRef);
|
||||
@@ -734,7 +732,7 @@ public class SiteServiceImpl implements SiteService, SiteModel
|
||||
// TODO if this is the only site manager do not downgrade their permissions
|
||||
|
||||
// If we are ...
|
||||
// -- the site manager
|
||||
// -- the current user has change permissions rights on the site
|
||||
// or we are ...
|
||||
// -- refering to a public site and
|
||||
// -- the role being set is consumer and
|
||||
@@ -816,12 +814,6 @@ public class SiteServiceImpl implements SiteService, SiteModel
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Raise a permission exception
|
||||
throw new AlfrescoRuntimeException("Access denied, user does not have permissions to modify membership details of the site '" + shortName + "'");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.repo.site.SiteService#createContainer(java.lang.String, java.lang.String, org.alfresco.service.namespace.QName, java.util.Map)
|
||||
|
Reference in New Issue
Block a user