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.

>
> 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*
_______________________________________________
Carbon-dev mailing list
[email protected]
https://wso2.org/cgi-bin/mailman/listinfo/carbon-dev

Reply via email to