mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged 5.1-MC1 (5.1.0) to HEAD (5.1)
119083 adavis: Merged 5.1.N (5.1.1) to 5.1-MC1 (5.1.0) 118660 adavis: Merged 5.0.2-CLOUD42 (Cloud ) to 5.1.N (5.1.1) 118618 gjames: RA-607 BCRYPT Improved the logging git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@119924 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -281,6 +281,7 @@ public class SitesImpl implements Sites
|
||||
if(siteInfo == null)
|
||||
{
|
||||
// site does not exist
|
||||
logger.debug("Site does not exist: "+siteId);
|
||||
throw new RelationshipResourceNotFoundException(personId, siteId);
|
||||
}
|
||||
siteId = siteInfo.getShortName();
|
||||
@@ -307,6 +308,7 @@ public class SitesImpl implements Sites
|
||||
if(siteInfo == null)
|
||||
{
|
||||
// site does not exist
|
||||
logger.debug("addSiteMember: site does not exist "+siteId+ " person "+personId);
|
||||
throw new EntityNotFoundException(siteId);
|
||||
}
|
||||
// set the site id to the short name (to deal with case sensitivity issues with using the siteId from the url)
|
||||
@@ -315,16 +317,19 @@ public class SitesImpl implements Sites
|
||||
String role = siteMember.getRole();
|
||||
if(role == null)
|
||||
{
|
||||
logger.debug("addSiteMember: Must provide a role "+siteMember);
|
||||
throw new InvalidArgumentException("Must provide a role");
|
||||
}
|
||||
|
||||
if(siteService.isMember(siteId, personId))
|
||||
{
|
||||
logger.debug("addSiteMember: "+ personId + " is already a member of site " + siteId);
|
||||
throw new ConstraintViolatedException(personId + " is already a member of site " + siteId);
|
||||
}
|
||||
|
||||
if(!siteService.canAddMember(siteId, personId, role))
|
||||
{
|
||||
logger.debug("addSiteMember: PermissionDeniedException "+siteId+ " person "+personId+ " role "+role);
|
||||
throw new PermissionDeniedException();
|
||||
}
|
||||
|
||||
@@ -334,6 +339,7 @@ public class SitesImpl implements Sites
|
||||
}
|
||||
catch (UnknownAuthorityException e)
|
||||
{
|
||||
logger.debug("addSiteMember: UnknownAuthorityException "+siteId+ " person "+personId+ " role "+role);
|
||||
throw new InvalidArgumentException("Unknown role '" + role + "'");
|
||||
}
|
||||
return siteMember;
|
||||
|
Reference in New Issue
Block a user