Details
-
Type:
Sub-task
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 0.4
-
Component/s: None
-
Labels:None
-
Environment:Grails-Jsecurity-0.4-SNAPSHOT
-
Patch Submitted:Yes
Description
Currently you cannot use the hasPermission tag like this:
<jsec:hasPermission permission="${'book:edit:'+book.id}">...</jsec:hasPermission>
You have to construct a WildcardPermission instance separately and pass that to the permission attribute of the tag.
JSecurity (0.9) has convenience methods on the Subject interface, that instead of taking a single Permission argument, they take a single String argument. JSecurity will delegate this call internally, but what's important: With the default setup a WildcardPermission will be created for you.
For details see: http://markmail.org/message/fip5gathvmk7po4l
The attached patch allows you to use the tag just like in the code snippet above by utilizing the single-String methods.
Sorry for the delay. I was put off committing it by the idea of writing functional tests. The tests are now done though.