mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
First cut of User Profile component - basic Edit Form and layout at present, displays User props such as name, location, biography etc.
- TBD: read only view (which will be the initial view), Save Changes, Upload photo. Alfresco Share logo added to slingshot header area. Improvements to user meta-data retrieval to return content strings if content properties are found. AlfrescoUserFactory now retrieves user bio property. Enhanced FreeMarker template API - added method to test for content properties. Enhanced script People API - added method to test for admin authority. Changed User Dashboard default template to two column. Removed some old files/folders no longer needed in slingshot. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@9942 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -441,6 +441,19 @@ public final class People extends BaseScopableProcessorExtension
|
|||||||
}
|
}
|
||||||
return Context.getCurrentContext().newArray(getScope(), parents);
|
return Context.getCurrentContext().newArray(getScope(), parents);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return true if the specified user is an Administrator authority.
|
||||||
|
*
|
||||||
|
* @param person to test
|
||||||
|
*
|
||||||
|
* @return true if an admin, false otherwise
|
||||||
|
*/
|
||||||
|
public boolean isAdmin(ScriptNode person)
|
||||||
|
{
|
||||||
|
ParameterCheck.mandatory("Person", person);
|
||||||
|
return this.authorityService.isAdminAuthority((String)person.getProperties().get(ContentModel.PROP_USERNAME));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get Contained Authorities
|
* Get Contained Authorities
|
||||||
|
@@ -2434,6 +2434,18 @@ public class ScriptNode implements Serializable, Scopeable
|
|||||||
return result != null ? result : new Object[0];
|
return result != null ? result : new Object[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper to return true if the supplied property value is a ScriptContentData object
|
||||||
|
*
|
||||||
|
* @param o Object to test
|
||||||
|
*
|
||||||
|
* @return true if instanceof ScriptContentData, false otherwise
|
||||||
|
*/
|
||||||
|
public boolean isScriptContent(Object o)
|
||||||
|
{
|
||||||
|
return (o instanceof ScriptContentData);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------
|
||||||
// Value Conversion
|
// Value Conversion
|
||||||
|
@@ -471,6 +471,18 @@ public abstract class BaseContentNode implements TemplateContent
|
|||||||
return (content != null ? content.getSize() : 0L);
|
return (content != null ? content.getSize() : 0L);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper to return true if the supplied property value is a TemplateContentData object
|
||||||
|
*
|
||||||
|
* @param o Object to test
|
||||||
|
*
|
||||||
|
* @return true if instanceof TemplateContentData, false otherwise
|
||||||
|
*/
|
||||||
|
public boolean isTemplateContent(Object o)
|
||||||
|
{
|
||||||
|
return (o instanceof TemplateContentData);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------
|
||||||
// Inner classes
|
// Inner classes
|
||||||
|
Reference in New Issue
Block a user