Hi,
another chapter of my "search of the holy grail" with JSPWiki & websphere security policies :-)

--------------
File: org.apache.auth.Authorization.Manager.java
Method: checkStaticPermission
Code:
        try
        {
            // Check the JVM-wide security policy first
            AccessController.checkPermission( permission );
            return Boolean.TRUE;
        }
        catch( AccessControlException e )
--------------
the "return Boolean.TRUE;" can't be disabled (with "//") as I suggested in precedent email because it manages all "non wiki" permissions. So I need a test on "permission" to see if it's or not a "wiki permission".
I'm trying substituting the statement with a "brutal" block as
--------------
String pName = permission.getName();
if (pName==null || pName.length()<4 || !pName.substring(0,4).equals("Wiki"))
                    return Boolean.TRUE;
--------------
And, it was time, here is the question: there is a "more nice" way to do the test?

Tanks for your patience :-)
Roberto








--
Messaggio inviato da WebMail - http://www.mercurio.it
-------------------------------------------------------

Reply via email to