Giving a user access to administration console

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2010 05:14 AM
Is this possible? Without giving the user the admin role? I want to give a user access to the administration console and be able to do all options there but not be able to access the dictionary path. Is this possible?
Best reguards,
Pedro
Best reguards,
Pedro
Labels:
- Labels:
-
Archive
21 REPLIES 21

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2010 04:47 PM
You could override NavigationBean and add method where you would check if user is member of some group.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2010 04:29 AM
Yes, thats what i want to do. I just dont know what method does that. Ithough i could use AuthorityServiceImpl and the getContainedAuthorities method, but i get an error. Is there any other method that i can use in the jsp to tell me what groups the user belongs to?
Im getting the currentUserName from the TenantAdminConsoleBean. How can i get the user's groups?
I was trying this:
but i get an error on:
Set<String> myGroups = asi.getContainingAuthorities(AuthorityType.GROUP, myUserName, false);
the error is:
Stacktrace:
caused by:
and
Stacktrace:
caused by:
java.lang.NullPointerException
what is wrong with my code?
Im getting the currentUserName from the TenantAdminConsoleBean. How can i get the user's groups?
I was trying this:
<%@ page import="org.alfresco.web.bean.repository.tenant.TenantAdminConsoleBean" %><%@ page import="org.alfresco.web.bean.NavigationBean" %><%@ page import="org.alfresco.repo.security.authority.AuthorityServiceImpl" %><%@ page import="org.alfresco.service.cmr.security.AuthorityType" %><%@ page import="java.util.Set" %><% TenantAdminConsoleBean tac = new TenantAdminConsoleBean();String myUserName= tac.getCurrentUserName();AuthorityServiceImpl asi = new AuthorityServiceImpl();Set<String> myGroups = asi.getContainingAuthorities(AuthorityType.GROUP, myUserName, false);boolean isContained = myGroups.contains("myAdmins");//person.getPerson(teste3); %>
but i get an error on:
Set<String> myGroups = asi.getContainingAuthorities(AuthorityType.GROUP, myUserName, false);
the error is:
Stacktrace:
caused by:
and
Stacktrace:
caused by:
java.lang.NullPointerException
what is wrong with my code?
