[jbossseam-issues] [JBoss JIRA] Closed: (JBSEAM-1019) Asserted objects should be handled polymorphically

Shane Bryzak (JIRA) jira-events at lists.jboss.org
Tue Mar 13 19:59:46 EDT 2007


     [ http://jira.jboss.com/jira/browse/JBSEAM-1019?page=all ]

Shane Bryzak closed JBSEAM-1019.
--------------------------------

    Resolution: Cannot Reproduce Bug

Closing this issue.

> Asserted objects should be handled polymorphically
> --------------------------------------------------
>
>                 Key: JBSEAM-1019
>                 URL: http://jira.jboss.com/jira/browse/JBSEAM-1019
>             Project: JBoss Seam
>          Issue Type: Feature Request
>          Components: Security
>            Reporter: Christian Bauer
>         Assigned To: Shane Bryzak
>
> Class hierarchy: Node(Document,Directory)
> I'm asserting an instance of Document into working memory like this:
>     <s:link id="editDoc" styleClass="linkNavigation" action="editDoc" accesskey="E"
>             rendered="#{s:hasPermission('NodeHome', 'edit', currentDocument)}"><u>E</u>dit</s:link>
> This doesn't fire:
> rule RestrictNodeHomeEditAccess
>     no-loop;
>     activation-group "permissions"
> when
>     c: PermissionCheck(name == "NodeHome", action == "edit");
>     Node(nodeWriteAccessLevel : writeAccessLevel, nodeCreator : createdBy)
>     Role(userAccessLevel : name -> (Integer.valueOf(userAccessLevel).intValue() >= nodeWriteAccessLevel.intValue()) )
>     or
>     User(authenticatedUserId : id -> (nodeCreator.getId().equals(authenticatedUserId)) )
> then
>     c.grant();
>     modify(c);
> end;
> This does:
> rule RestrictNodeHomeEditAccess
>     no-loop;
>     activation-group "permissions"
> when
>     c: PermissionCheck(name == "NodeHome", action == "edit");
>     Document(nodeWriteAccessLevel : writeAccessLevel, nodeCreator : createdBy)
>     Role(userAccessLevel : name -> (Integer.valueOf(userAccessLevel).intValue() >= nodeWriteAccessLevel.intValue()) )
>     or
>     User(authenticatedUserId : id -> (nodeCreator.getId().equals(authenticatedUserId)) )
> then
>     c.grant();
>     modify(c);
> end;
> I couldn't find anything in the Drools docs about polymorphism but it looks like Facts are not checked polymorphically. Sad language that is.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list