protected boolean hasAuthority(String username) { // must be "super" admin for tenant administration return ((username != null) && (authorityService.isAdminAuthority(username)) && (! tenantService.isTenantUser(username))); }
protected boolean hasAuthority(String username) { // must be "super" admin for tenant administration return ((username != null) && (authorityService.isAdminAuthority(username)) && (! tenantService.isTenantUser(username))); }
if (! currentDomain.equals(TenantService.DEFAULT_DOMAIN)) if (! tenantService.isTenantUser(username))
if (! currentDomain.equals(TenantService.DEFAULT_DOMAIN)) if (! tenantService.isTenantUser(username))
/** * @see org.alfresco.service.cmr.site.SiteService#listSites(java.lang.String, int) */ public List<SiteInfo> listSites(final String userName, final int size) { // MT share - for activity service remote system callback (deprecated) if (tenantService.isEnabled() && TenantUtil.isCurrentDomainDefault() && (AuthenticationUtil.SYSTEM_USER_NAME.equals(AuthenticationUtil.getRunAsUser())) && tenantService.isTenantUser(userName)) { final String tenantDomain = tenantService.getUserDomain(userName); return TenantUtil.runAsSystemTenant(new TenantRunAsWork<List<SiteInfo>>() { public List<SiteInfo> doWork() throws Exception { return listSitesImpl(userName, size); } }, tenantDomain); } else { return listSitesImpl(userName, size); } }
/** * @see org.alfresco.service.cmr.site.SiteService#listSites(java.lang.String, int) */ public List<SiteInfo> listSites(final String userName, final int size) { // MT share - for activity service remote system callback (deprecated) if (tenantService.isEnabled() && TenantUtil.isCurrentDomainDefault() && (AuthenticationUtil.SYSTEM_USER_NAME.equals(AuthenticationUtil.getRunAsUser())) && tenantService.isTenantUser(userName)) { final String tenantDomain = tenantService.getUserDomain(userName); return TenantUtil.runAsSystemTenant(new TenantRunAsWork<List<SiteInfo>>() { public List<SiteInfo> doWork() throws Exception { return listSitesImpl(userName, size); } }, tenantDomain); } else { return listSitesImpl(userName, size); } }
if (tenantService.isTenantUser())
if (tenantService.isTenantUser())
if(canDeleteModel) if (tenantService.isEnabled() && tenantService.isTenantUser() == false)
public void beforeDeleteNode(NodeRef nodeRef) { String userName = (String) this.nodeService.getProperty(nodeRef, ContentModel.PROP_USERNAME); if (this.authorityService.isGuestAuthority(userName) && !this.tenantService.isTenantUser(userName)) { throw new AlfrescoRuntimeException("The " + userName + " user cannot be deleted."); } NodeRef parentRef = null; ChildAssociationRef parentAssocRef = nodeService.getPrimaryParent(nodeRef); if (parentAssocRef != null) { parentRef = parentAssocRef.getParentRef(); if (getPeopleContainer().equals(parentRef)) { // Remove the cache entry. // Note that the associated node has not been deleted and is therefore still // visible to any other code that attempts to see it. We therefore need to // prevent the value from being added back before the node is actually // deleted. removeFromCache(userName, true); } } }
public void beforeDeleteNode(NodeRef nodeRef) { String userName = (String) this.nodeService.getProperty(nodeRef, ContentModel.PROP_USERNAME); if (this.authorityService.isGuestAuthority(userName) && !this.tenantService.isTenantUser(userName)) { throw new AlfrescoRuntimeException("The " + userName + " user cannot be deleted."); } NodeRef parentRef = null; ChildAssociationRef parentAssocRef = nodeService.getPrimaryParent(nodeRef); if (parentAssocRef != null) { parentRef = parentAssocRef.getParentRef(); if (getPeopleContainer().equals(parentRef)) { // Remove the cache entry. // Note that the associated node has not been deleted and is therefore still // visible to any other code that attempts to see it. We therefore need to // prevent the value from being added back before the node is actually // deleted. removeFromCache(userName, true); } } }
if(canDeleteModel) if (tenantService.isEnabled() && tenantService.isTenantUser() == false)
if ( m_alfrescoConfig.getTenantService().isEnabled() && m_alfrescoConfig.getTenantService().isTenantUser())
if ( m_alfrescoConfig.getTenantService().isEnabled() && m_alfrescoConfig.getTenantService().isTenantUser())
m_alfrescoConfig.getTenantService().isTenantUser() && typ != ShareType.ADMINPIPE)
m_alfrescoConfig.getTenantService().isTenantUser() && typ != ShareType.ADMINPIPE)