cancel
Showing results for 
Search instead for 
Did you mean: 

'Super' Administrator for Multi Tenant Alfresco

softbless
Champ in-the-making
Champ in-the-making
Hi Guys,

We use Multi Tenant feature in Alfresco Community Edition 3.2r2. Everything works fine, but we need to have a kind of "super" Administrator for our Alfresco. For example, i create tenant "FinanceTeam" and "ProjectTeam"

My question is :
# Could "admin" (not admin@FinanceTeam) access all the content/space in tenant FinanceTeam? By default, I think it cannot be done. Anyone could share some tips about this?
# Could we make a User Group, such as User Group AdminLevel1, and could we give the users in that group access to all content and space in Alfresco?

Please kindly advise guys.
11 REPLIES 11

chandu7ee
Champ in-the-making
Champ in-the-making
Even i need this kind of help., can any body know  is there any javascript  API to get tenant names, users under these tenants.  Smiley Sad

as a super admin i just want to know list of tenants., and users under these tenants with a simple javascript API.



thanks & regards
Chandu

savic_prvoslav
Champ on-the-rise
Champ on-the-rise
TemplateContentWork tcw = new TemplateContentWork(req, res);
AuthenticationUtil.setRunAsUser("admin@tenant");
tcw.doWork();

public class TemplateContentWork implements RunAsWork<Object>
   {
      private HttpServletRequest req = null;
      private HttpServletResponse res = null;
     
      public TemplateContentWork(HttpServletRequest req, HttpServletResponse res)
      {
         this.req = req;
         this.res = res;
      }
     
      public Object doWork() throws Exception
      {
         processTemplateRequest(this.req, this.res, false);
        
         return null;
      }
   }

This way you can create a way to access other tenants and their features.

List of tenants is visible on faces/jsp/admin/tenantadmin-console.jsp
List of users is not visible anywhere, you have to create java support on this, I gues using code above you can be on the good way.

chandu7ee
Champ in-the-making
Champ in-the-making
how can i get java API for tenant details.

is there any link., pls forward  the link if possible.


thanks. 😎

savic_prvoslav
Champ on-the-rise
Champ on-the-rise
Hi, you have tenant service
http://www.opendocs.net/javadoc/alfresco/repository/org/alfresco/repo/tenant/MultiTAdminServiceImpl....
<beans>

   <!–                                           –>
   <!– MT Admin Service Implementation –>
   <!–                                           –>
           
   <bean id="tenantAdminService"
hire you have its id .

rest you can manage your self not a big deal Smiley Happy

chandu7ee
Champ in-the-making
Champ in-the-making
hi

I enabled MT in alfresco and created tenants in that. after that the tenant admin want to know how much space they are used and space alloted to them.(even as a super admin i want to know space alloted to each tenant)

As a super admin i just want to write a webscript to know about tenant space i used org.alfresco.repo.tenant.TenantAdminService,
but no chance to get tenant space in that class. please let me know how to get it as soon as possible

savic_prvoslav
Champ on-the-rise
Champ on-the-rise
when you create tenant you can specify its root contentstore path( http://wiki.alfresco.com/wiki/MT#Create_Tenant )
so when you need to know how much tenant is using memory of the hard disc you just run in java code that I have sent you and calculate the size of content store.

so example
create <tenant domain> <tenant admin password> [<root contentstore dir>]( command specification)
create prvoslav passwor0 /opt/tenants/prvoslav (this would be command)

question: how much tenant prvoslav is using?
Utils.sizeOfDirectory("/opt/tenants/prvoslav "); //result on this function would be answer .

chandu7ee
Champ in-the-making
Champ in-the-making
Hey thanks,

its working fine for me., but small thing how to know the space for tenant which is already created with out specified <root contentstore dir>.

Chandu

savic_prvoslav
Champ on-the-rise
Champ on-the-rise
you define class
public static class ClassA implements RunAsWork<Object> {
dowork….
{
calculate size of CompanyHome directory.
}
}

AuthenticationUtil.setRunAsUser(Util.getAdminUserName());
   
        classA .doWork();

chandu7ee
Champ in-the-making
Champ in-the-making
sorry,  Smiley Sad

I did n't get you? what exactly that means.can you explain in detail.


Thanks.