portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 12775] New: - getACL() from within VelocityPortletAction returns null
Date Wed, 18 Sep 2002 14:26:56 GMT
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:   <mailto:jetspeed-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:jetspeed-dev-help@jakarta.apache.org>


Mime
View raw message