portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Dimon" <m...@dimon.freeserve.co.uk>
Subject AbstractPortletControl Bug ???
Date Tue, 16 Oct 2001 06:06:42 GMT
Hi,

I've noticed that in

 org.apache.jetspeed.portal.controls.AbstractPortletControl

the methods *like* allowClose()  do the security check with a || rather than
an && , if I change this to && then the permissions behave as
expected  and you can now disable the close icon's ect for users with the
admin pane.

Is this a bug ? or something unfinished ?

---------------------------------------------------------------------------

   public boolean allowClose( RunData rundata )
    {
        Portlet p = getPortlet();

        if (p==null) return false;

        if ((p instanceof PortletSet)
            /*** this should be && not || ??? ***/  ||
(JetspeedSecurity.checkPermission(rundata,

JetspeedSecurity.PERMISSION_CLOSE,
                                                p)))
        {
            if (p instanceof PortletState)
            {
                return ((PortletState)p).allowClose(rundata);
            }
        }

        return false;
    }

----------------------------------------------------------------------------
-



Regards Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Mime
View raw message