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

Christian Bauer (JIRA) jira-events at lists.jboss.org
Fri Mar 9 16:47:36 EST 2007


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


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