mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Site Service: GET, PUT and DELETE methods implemented and unit tested for Membership resource
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@9063 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -30,8 +30,6 @@ import java.util.Map;
|
||||
import org.alfresco.repo.jscript.ScriptableHashMap;
|
||||
import org.alfresco.repo.site.SiteInfo;
|
||||
import org.alfresco.repo.site.SiteService;
|
||||
import org.jgroups.util.GetNetworkInterfaces1_4;
|
||||
import org.mozilla.javascript.ScriptableObject;
|
||||
|
||||
/**
|
||||
* Site JavaScript object
|
||||
@@ -192,6 +190,30 @@ public class Site implements Serializable
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a user's role on this site.
|
||||
* <p>
|
||||
* If the user is not a member of the site then null is returned.
|
||||
*
|
||||
* @param userName user name
|
||||
* @return String user's role or null if not a member
|
||||
*/
|
||||
public String getMembersRole(String userName)
|
||||
{
|
||||
return this.siteService.getMembersRole(getShortName(), userName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates whether a user is a member of the site.
|
||||
*
|
||||
* @param userName user name
|
||||
* @return boolean true if the user is a member of the site, false otherwise
|
||||
*/
|
||||
public boolean isMember(String userName)
|
||||
{
|
||||
return this.siteService.isMember(getShortName(), userName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the membership details for a user.
|
||||
* <p>
|
||||
|
Reference in New Issue
Block a user