archiva-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Olivier Lamy <ol...@apache.org>
Subject Re: UI refactoring
Date Tue, 06 Dec 2011 13:28:55 GMT
2011/12/6 Brett Porter <brett@apache.org>:
> Haven't looked yet, but the tech sounds good.
>
> One question:
>
> On 06/12/2011, at 12:40 AM, Olivier Lamy wrote:
>
>>
>> To handle karma on the ui, an attribute must be added in element which
>> need roles.
>> Sample:
>> <li style="display: none" redback-permissions="{permissions:
>> ['archiva-manage-users']}"><a href="#"
>> onclick="displayUsersGrid()">User List</a></li>
>>
>
> How does this work?

Note it can be an array of permissions.
After logging a function get user karma and check all element which
have this attribute. If the user doesn't have at least one of the
needed permissions the html element is hide.

See https://fisheye.codehaus.org/browse/redback/redback/trunk/redback-integrations/redback-knockoutjs/redback-knockoutjs-example/src/main/webapp/js/main.js?r=1605&r=1606#to62
 function decorateMenuWithKarma

BTW permissions are checked again on rest call with the annotation
mechanism described here:
http://redback.codehaus.org/integration/rest.html
("PermissionInterceptor" section).

>
> - Brett
>
>
> --
> Brett Porter
> brett@apache.org
> http://brettporter.wordpress.com/
> http://au.linkedin.com/in/brettporter
>
>
>
>



-- 
Olivier Lamy
Talend: http://coders.talend.com
http://twitter.com/olamy | http://linkedin.com/in/olamy

Mime
View raw message