private HashMap<QName, Serializable> getDefaultProperties(String userName) { HashMap<QName, Serializable> properties = new HashMap<QName, Serializable>(); properties.put(ContentModel.PROP_USERNAME, userName); properties.put(ContentModel.PROP_FIRSTNAME, tenantService.getBaseNameUser(userName)); properties.put(ContentModel.PROP_LASTNAME, ""); properties.put(ContentModel.PROP_EMAIL, ""); properties.put(ContentModel.PROP_ORGID, ""); properties.put(ContentModel.PROP_HOME_FOLDER_PROVIDER, defaultHomeFolderProvider); properties.put(ContentModel.PROP_SIZE_CURRENT, 0L); properties.put(ContentModel.PROP_SIZE_QUOTA, -1L); // no quota return properties; }
private HashMap<QName, Serializable> getDefaultProperties(String userName) { HashMap<QName, Serializable> properties = new HashMap<QName, Serializable>(); properties.put(ContentModel.PROP_USERNAME, userName); properties.put(ContentModel.PROP_FIRSTNAME, tenantService.getBaseNameUser(userName)); properties.put(ContentModel.PROP_LASTNAME, ""); properties.put(ContentModel.PROP_EMAIL, ""); properties.put(ContentModel.PROP_ORGID, ""); properties.put(ContentModel.PROP_HOME_FOLDER_PROVIDER, defaultHomeFolderProvider); properties.put(ContentModel.PROP_SIZE_CURRENT, 0L); properties.put(ContentModel.PROP_SIZE_QUOTA, -1L); // no quota return properties; }
public boolean isSystemUserName(String userName) { return getSystemUserName().equals(this.tenantService.getBaseNameUser(userName)); }
public boolean isGuestUserName(String userName) { return AuthenticationUtil.getGuestUserName().equalsIgnoreCase(this.tenantService.getBaseNameUser(userName)); }
public boolean isSystemUserName(String userName) { return getSystemUserName().equals(this.tenantService.getBaseNameUser(userName)); }
public boolean isGuestUserName(String userName) { return AuthenticationUtil.getGuestUserName().equalsIgnoreCase(this.tenantService.getBaseNameUser(userName)); }
private String getCurrentUser() { String userId = AuthenticationUtil.getFullyAuthenticatedUser(); if ((userId != null) && (! userNamesAreCaseSensitive) && (! AuthenticationUtil.getSystemUserName().equals(this.tenantService.getBaseNameUser(userId)))) { // user names are not case-sensitive userId = userId.toLowerCase(); } return userId; }
private String getCurrentUser() { String userId = AuthenticationUtil.getFullyAuthenticatedUser(); if ((userId != null) && (! userNamesAreCaseSensitive) && (! AuthenticationUtil.getSystemUserName().equals(this.tenantService.getBaseNameUser(userId)))) { // user names are not case-sensitive userId = userId.toLowerCase(); } return userId; }
private String getCurrentUser() { String currentUser = AuthenticationUtil.getFullyAuthenticatedUser(); if (currentUser == null) { throw new AccessDeniedException("No authenticated user; cannot get archived nodes."); } if (!userNamesAreCaseSensitive && !AuthenticationUtil.getSystemUserName().equals( tenantService.getBaseNameUser(currentUser))) { // user names are not case-sensitive currentUser = currentUser.toLowerCase(); } return currentUser; }
private String getCurrentUser() { String currentUser = AuthenticationUtil.getFullyAuthenticatedUser(); if (currentUser == null) { throw new AccessDeniedException("No authenticated user; cannot get archived nodes."); } if (!userNamesAreCaseSensitive && !AuthenticationUtil.getSystemUserName().equals( tenantService.getBaseNameUser(currentUser))) { // user names are not case-sensitive currentUser = currentUser.toLowerCase(); } return currentUser; }
public List<FeedControl> getFeedControls(String userId) { ParameterCheck.mandatoryString("userId", userId); if (! userNamesAreCaseSensitive) { userId = userId.toLowerCase(); } String currentUser = getCurrentUser(); if ((currentUser == null) || (! ((authorityService.isAdminAuthority(currentUser)) || (currentUser.equals(userId)) || (AuthenticationUtil.getSystemUserName().equals(this.tenantService.getBaseNameUser(currentUser)))))) { throw new AlfrescoRuntimeException("Current user " + currentUser + " is not permitted to get feed controls for " + userId); } return getFeedControlsImpl(userId); }
public List<FeedControl> getFeedControls(String userId) { ParameterCheck.mandatoryString("userId", userId); if (! userNamesAreCaseSensitive) { userId = userId.toLowerCase(); } String currentUser = getCurrentUser(); if ((currentUser == null) || (! ((authorityService.isAdminAuthority(currentUser)) || (currentUser.equals(userId)) || (AuthenticationUtil.getSystemUserName().equals(this.tenantService.getBaseNameUser(currentUser)))))) { throw new AlfrescoRuntimeException("Current user " + currentUser + " is not permitted to get feed controls for " + userId); } return getFeedControlsImpl(userId); }
private boolean containsMatch(Set<String> names, String name) String baseName = this.tenantService.getBaseNameUser(name); if (this.tenantService.isEnabled()) || this.userNameMatcher.matches(this.tenantService.getBaseNameUser(candidate), baseName))
private boolean containsMatch(Set<String> names, String name) String baseName = this.tenantService.getBaseNameUser(name); if (this.tenantService.isEnabled()) || this.userNameMatcher.matches(this.tenantService.getBaseNameUser(candidate), baseName))
if ((currentUser == null) || (tenantService.getBaseNameUser(currentUser).equals(AuthenticationUtil.getSystemUserName())))
(authorityService.isAdminAuthority(currentUser)) || (currentUser.equals(feedUserId)) || (AuthenticationUtil.getSystemUserName().equals(this.tenantService.getBaseNameUser(currentUser)))))
(authorityService.isAdminAuthority(currentUser)) || (currentUser.equals(feedUserId)) || (AuthenticationUtil.getSystemUserName().equals(this.tenantService.getBaseNameUser(currentUser)))))
if ((currentUser == null) || (tenantService.getBaseNameUser(currentUser).equals(AuthenticationUtil.getSystemUserName())))
final String domainUsername = tenantService.getBaseNameUser(username); String tenantDomain = tenantService.getUserDomain(username); boolean disabled = !TenantService.DEFAULT_DOMAIN.equals(tenantDomain) &&
if (! (ignore(nodeRef) || tenantService.getBaseNameUser(effectiveUserName).equals(AuthenticationUtil.getSystemUserName())))