I think we need a simple API for super-tenants:
public interface SuperTenant {
boolean isSuperTenant();
long getTenantId(String tenantName);
CarbonContext getTenantCarbonContext(long tenantId);
CarbonContext getTenantCarbonContext(String tenantName);
}
>From the CarbonContext you can then access the per-tenant registry, etc.
Paul
On 29 November 2010 08:54, Senaka Fernando <[email protected]> wrote:
>
>
> On Mon, Nov 29, 2010 at 2:17 PM, Afkham Azeez <[email protected]> wrote:
>
>>
>>
>>
>>
>> On Mon, Nov 29, 2010 at 2:01 PM, Senaka Fernando <[email protected]> wrote:
>>
>>>
>>>
>>> On Mon, Nov 29, 2010 at 12:41 PM, Sanjiva Weerawarana
>>> <[email protected]>wrote:
>>>
>>>> Is this a good thing to be checking for?? That is, shouldn't super
>>>> tenant code "just know" (and assume) that its indeed the super tenant? I
>>>> assume that's how other super tenant code works.
>>>>
>>>> What are you going to do if the test is false?
>>>>
>>>
>>> Well, the requirement is at the front-end, to selectively hide certain
>>> portions of a JSP page from tenants, and show it only to the super-tenant.
>>> Also, the CarbonContext is only available on the BE session.
>>>
>>
>> One way of doing this is when the BE sends data to the FE, if the request
>> was not from the super-tenant, it could send NULL for the items that should
>> be shown only to super-tenant.
>>
>
> OK how about this:
>
> The registry has an admin service which will configure CSS @ the Carbon UI,
> depending on whether the registry was read-only or not. This is because, we
> disable certain operations in read-only mode. We could do the same for this
> and return a true/false status? WDYT?
>
> Thanks,
> Senaka.
>
>>
>>> Thanks,
>>> Senaka.
>>>
>>>>
>>>> Sanjiva.
>>>>
>>>>
>>>> On Mon, Nov 29, 2010 at 11:33 AM, Afkham Azeez <[email protected]> wrote:
>>>>
>>>>> What about CarbonContext.getTenantId() ==
>>>>> MultitenantConstants.SUPER_TENANT_ID ?
>>>>>
>>>>>
>>>>>
>>>>> On Mon, Nov 29, 2010 at 10:17 AM, Senaka Fernando <[email protected]>wrote:
>>>>>
>>>>>> Hi all,
>>>>>>
>>>>>> In a UI bundle, how could i determine whether I am super-tenant or
>>>>>> not?
>>>>>>
>>>>>> 1. "true".equals(request.getSession().getAttribute(IS_MASTER_TENANT))
>>>>>> ?
>>>>>> 2.
>>>>>> MultitenantUtils.getTenantDomainFromRequestURL(request.getRequestURI())
>>>>>> ==
>>>>>> null ?
>>>>>>
>>>>>> And, most importantly, does this return same results for standalone?
>>>>>> In other words this should treat the standalone (product deployment) as a
>>>>>> tenant-zero only deployment for somethings to work properly. As of now, 1
>>>>>> does not work in Product Mode and 2 doesn't seem to work @ all, after
>>>>>> adding
>>>>>> the LB for some reason.
>>>>>>
>>>>>> So, is there a better way? and why don't we make this some utility
>>>>>> method, instead of using our own way to figure this out?
>>>>>>
>>>>>> Thanks,
>>>>>> Senaka.
>>>>>>
>>>>>> --
>>>>>> *Senaka Fernando*
>>>>>> Associate Technical Lead & Product Manager - WSO2 G-Reg;
>>>>>> WSO2, Inc.; http://wso2.com*
>>>>>> Member; Apache Software Foundation; http://apache.org
>>>>>>
>>>>>> E-mail: senaka AT wso2.com
>>>>>> **P: +1 408 754 7388; ext: 51736*; *M: +94 77 322 1818
>>>>>> Linked-In: http://www.linkedin.com/in/senakafernando
>>>>>>
>>>>>> *Lean . Enterprise . Middleware
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Stratos-dev mailing list
>>>>>> [email protected]
>>>>>> https://wso2.org/cgi-bin/mailman/listinfo/stratos-dev
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> *Afkham Azeez*
>>>>> Senior Software Architect & Senior Manager; WSO2, Inc.;
>>>>> http://wso2.com,
>>>>> *
>>>>> *
>>>>> *Member; Apache Software Foundation;
>>>>> **http://www.apache.org/*<http://www.apache.org/>
>>>>> *
>>>>> email: **[email protected]* <[email protected]>* cell: +94 77 3320919
>>>>> blog: **http://blog.afkham.org* <http://blog.afkham.org>*
>>>>> twitter:
>>>>> **http://twitter.com/afkham_azeez*<http://twitter.com/afkham_azeez>
>>>>> *
>>>>> linked-in: **http://lk.linkedin.com/in/afkhamazeez*
>>>>> *
>>>>> *
>>>>> *Lean . Enterprise . Middleware*
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Stratos-dev mailing list
>>>>> [email protected]
>>>>> https://wso2.org/cgi-bin/mailman/listinfo/stratos-dev
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Sanjiva Weerawarana, Ph.D.
>>>> Founder, Chairman & CEO; WSO2, Inc.; http://wso2.com/
>>>> email: [email protected]; phone: +94 11 763 9614; cell: +94 77 787 6880
>>>> | +1 650 265 8311
>>>> blog: http://sanjiva.weerawarana.org/
>>>>
>>>> Lean . Enterprise . Middleware
>>>>
>>>
>>>
>>>
>>> --
>>> *Senaka Fernando*
>>> Associate Technical Lead & Product Manager - WSO2 G-Reg;
>>> WSO2, Inc.; http://wso2.com*
>>> Member; Apache Software Foundation; http://apache.org
>>>
>>> E-mail: senaka AT wso2.com
>>> **P: +1 408 754 7388; ext: 51736*; *M: +94 77 322 1818
>>> Linked-In: http://www.linkedin.com/in/senakafernando
>>>
>>> *Lean . Enterprise . Middleware
>>>
>>>
>>
>>
>> --
>> *Afkham Azeez*
>> Senior Software Architect & Senior Manager; WSO2, Inc.; http://wso2.com,
>> *
>> *
>> *Member; Apache Software Foundation;
>> **http://www.apache.org/*<http://www.apache.org/>
>> *
>> email: **[email protected]* <[email protected]>* cell: +94 77 3320919
>> blog: **http://blog.afkham.org* <http://blog.afkham.org>*
>> twitter: **http://twitter.com/afkham_azeez*<http://twitter.com/afkham_azeez>
>> *
>> linked-in: **http://lk.linkedin.com/in/afkhamazeez*
>> *
>> *
>> *Lean . Enterprise . Middleware*
>>
>>
>
>
> --
> *Senaka Fernando*
> Associate Technical Lead & Product Manager - WSO2 G-Reg;
> WSO2, Inc.; http://wso2.com*
> Member; Apache Software Foundation; http://apache.org
>
> E-mail: senaka AT wso2.com
> **P: +1 408 754 7388; ext: 51736*; *M: +94 77 322 1818
> Linked-In: http://www.linkedin.com/in/senakafernando
>
> *Lean . Enterprise . Middleware
>
>
> _______________________________________________
> Stratos-dev mailing list
> [email protected]
> https://wso2.org/cgi-bin/mailman/listinfo/stratos-dev
>
>
--
Paul Fremantle
CTO and Co-Founder, WSO2
OASIS WS-RX TC Co-chair, VP, Apache Synapse
Office: +44 844 484 8143
Cell: +44 798 447 4618
blog: http://pzf.fremantle.org
twitter.com/pzfreo
[email protected]
wso2.com Lean Enterprise Middleware
Disclaimer: This communication may contain privileged or other confidential
information and is intended exclusively for the addressee/s. If you are not
the intended recipient/s, or believe that you may have received this
communication in error, please reply to the sender indicating that fact and
delete the copy you received and in addition, you should not print, copy,
retransmit, disseminate, or otherwise use the information contained in this
communication. Internet communications cannot be guaranteed to be timely,
secure, error or virus-free. The sender does not accept liability for any
errors or omissions.
_______________________________________________
Carbon-dev mailing list
[email protected]
https://wso2.org/cgi-bin/mailman/listinfo/carbon-dev