submitlink is shown while action is forbidden by access control rule
The [edit] link in showWikiText is shown even while mayEdit returns false(text.getEntity) returns false
access control rulesrule ajaxtemplate editableText(text : Ref) {
true
}
rule ajaxtemplate showWikiText(text : Ref) {
mayView(text.getEntity())
rule action edit() { mayEdit(text.getEntity()) }
}
rule ajaxtemplate editWikiText(text : Ref) {
mayEdit(text.getEntity())
}section editable text
define ajax editableText(text : Ref) {
placeholder showText{ showWikiText(text) }
}define ajax showWikiText(text : Ref) {
Submitted by Eelco Visser on 5 January 2011 at 21:15
action edit(){ replace(showText, editWikiText(text)); }
container[class:=“showWikiTextEdit”]{ submitlink edit() { “[edit]” } }
output(text)
}
Log in to post comments