You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by bu...@apache.org on 2002/09/18 16:26:56 UTC

DO NOT REPLY [Bug 12775] New: - getACL() from within VelocityPortletAction returns null

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12775>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12775

getACL() from within VelocityPortletAction returns null

           Summary: getACL() from within VelocityPortletAction returns null
           Product: Jetspeed
           Version: 1.4b1-dev / CVS
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Security
        AssignedTo: jetspeed-dev@jakarta.apache.org
        ReportedBy: wsturges@bjc.org


>From within a VelocityPortletAction, the following function receives a null 
AccessControlList from getACL().  User is defined and has roles/permissions.  
The workaround by calling JetspeedSecurity.getRoles()/getPermissions() works 
fine.  Have only tested within a VelocityPortletAction.  A few other people 
have reported the same problem in the maillist, but no bug has been posted to 
bugzilla.

public void doSend(RunData data, Context context)
{
  try {
    String userName = data.getUser().getUserName();
    PermissionSet permissions = null;
    AccessControlList acl = data.getACL();
    if (acl == null) {
      System.out.println("ACL is NULL!");
    } else {
      permissions = data.getACL().getPermissions();
    }

    System.out.println("userName: " + userName + ", permissions: " + 
permissions);

  } catch (Exception e) {
    e.printStackTrace();
    context.put("message", e.getMessage());
  }
}

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>