0

Authz Zul Tags

asked 2010-10-02 17:04:36 +0800

eptx gravatar image eptx
130 3

I can secure small app sections using Java:

if(auth.isPermitted(action,resource)){
//secured code here
}

...and using jsp tags:

<auth:is-permitted action="GET" uri="#{contextPath}/navigation/manager">
<div class="toolbar">
<h2>#{messages['section.heading']}</h2>
</auth:is-permitted>

How may I leverage this pattern, in a declarative way, using zul?

As a component attribute:

<label value="@{model.secureMessage}" ispermitted="GET;${contextPath}/navigation/manager" />


Or as a wrapper component like jsp tag above:

<ispermitted action="GET" uri="${contextPath}/navigation/manager">
<div class="toolbar">
<h2>${messages['section.heading']}</h2>
</is-permitted>


Note that currently, ZK component data is sent to the client even if its "visible" attribute is "false". This is NOT acceptable for secure components.

Any guidance on implementing this zk is appreciated.

delete flag offensive retag edit

1 Reply

Sort by ยป oldest newest

answered 2010-10-05 20:44:10 +0800

PeterKuo gravatar image PeterKuo
481 2

The if Attribute
Please refer to
http://docs.zkoss.org/wiki/ZUML_ZK_Attributes#The_if_Attribute

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2010-10-02 17:04:36 +0800

Seen: 356 times

Last updated: Oct 05 '10

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More