mholz       2004/02/02 00:58:27

  Modified:    src/doc  Tag: SLIDE_2_0_RELEASE_BRANCH changelog.xml
               src/share/org/apache/slide/security Tag:
                        SLIDE_2_0_RELEASE_BRANCH SecurityImpl.java
  Log:
  When the store contains a action, which was not defined in Domain.xml a
  warning is logged instead of throwing a NPE.
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.84.2.8  +1 -0      jakarta-slide/src/doc/changelog.xml
  
  Index: changelog.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/src/doc/changelog.xml,v
  retrieving revision 1.84.2.7
  retrieving revision 1.84.2.8
  diff -u -r1.84.2.7 -r1.84.2.8
  --- changelog.xml     1 Feb 2004 12:40:44 -0000       1.84.2.7
  +++ changelog.xml     2 Feb 2004 08:58:27 -0000       1.84.2.8
  @@ -15,6 +15,7 @@
   release.
        
         <changelog>
  +        <fix date="February 02, 2004" author="mholz">Handle unknown actions in 
SecurityImpl.</fix>
           <add date="February 01, 2004" author="mholz">Added JDBC adapter, which 
provides backward compatibility with Slide 1.x JDBC store.</add>    
                <fix date="January 29, 2004" author="ozeigermann">SQL Server now 
allows for unicode in all strings. Patched contributed by Jacob Lund.</fix>
   
  
  
  
  No                   revision
  No                   revision
  1.44.2.2  +11 -5     
jakarta-slide/src/share/org/apache/slide/security/SecurityImpl.java
  
  Index: SecurityImpl.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/src/share/org/apache/slide/security/SecurityImpl.java,v
  retrieving revision 1.44.2.1
  retrieving revision 1.44.2.2
  diff -u -r1.44.2.1 -r1.44.2.2
  --- SecurityImpl.java 30 Jan 2004 13:37:37 -0000      1.44.2.1
  +++ SecurityImpl.java 2 Feb 2004 08:58:27 -0000       1.44.2.2
  @@ -1184,7 +1184,13 @@
           }
           else {
               if (actionAggregationClosure != null) {
  -                return 
((Set)actionAggregationClosure.get(permAction)).contains(checkAction);
  +                Set permActionSet = (Set)actionAggregationClosure.get(permAction);
  +                if (permActionSet == null) {
  +                    logger.log("Unknown action " + permAction.getUri() , 
LOG_CHANNEL, Logger.WARNING);
  +                    return false;
  +                } else {    
  +                    return permActionSet.contains(checkAction);
  +                }
               }
               else {
                   Uri u = namespace.getUri(token, checkAction.getUri());
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to