05-07-2010 05:14 AM
05-07-2010 06:34 AM
05-07-2010 07:12 AM
05-07-2010 08:03 AM
05-07-2010 10:11 AM
you can create some cind of group for "admin" users and checking this in the class adminAuthfilter if they are in this group then give them access.
You can do this by editing :
web.xml
Admin Authentication Filter ( you can remove the usage of admin filter , this would be wrong idea, but you can do this)
class rg.alfresco.web.app.servlet.AdminAuthenticationFilter , this class checks if current user is admin or not .
05-07-2010 11:19 AM
you have to code in that class ( you would replace that class with your own and inherit it ) next:
if (isAdmin)
{
//add hire :
//get all users from that group
authorities = this.getAuthorityService()
.getContainedAuthorities(AuthorityType.USER,
"GROUP_NAME_GROUP", immediate);
//get current user
String currentUserName=Application.getCurrentUser(FacesContext.getCurrentInstance()).getUserName();
//check if current user is in this group
for (String authority : authorities) {
NodeRef ref = this.getPersonService().getPerson(authority);
String userName= this.getNodeService().getProperty(ref, ContentModel.PROP_USERNAME);
if(userName.equals(currentUserName))//current user is in this group
{
chain.doFilter(req, res);
}
}
this sould do it, you would have acces to admin parts,
also you can create multiple filters, and define some kind of security for your self.
So have funn coding this out, but I think this is more or less what you need to make it nice and net .
PS: change classs of filter admin authentification filter according to what you jave coded out.
chain.doFilter(req, res); //if is admin go to the page like /jsp/admin/….
}
else
{
httpResponse.sendError(HttpServletResponse.SC_FORBIDDEN); //return 403
}
}
05-08-2010 12:42 PM
05-09-2010 10:20 AM
05-10-2010 06:36 AM
05-10-2010 06:43 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.