Class CheckRightsHandler

    • Constructor Detail

      • CheckRightsHandler

        public CheckRightsHandler()
    • Method Detail

      • processAction

        public boolean processAction()
                              throws java.io.IOException
        Description copied from class: JcmsFormHandler
        Method to be implemented to check/validate action to be performed and process them.

        Default implementation is to return false. No need to call super method.

        This method may NOT be invoked at all if security validation are not met.

        You must ensure your handler and JSP can work properly without any code invoked in this method.

        Overrides:
        processAction in class JcmsFormHandler
        Returns:
        false if no redirection is needed, true otherwise
        Throws:
        java.io.IOException - IO Exception
      • init

        protected void init()
        Description copied from class: JcmsFormHandler
        Method to implement if you need to initialize your handler from parameter received, prior to all security validation.

        You must absolutely not perform any action which modify data or site configuration.

        Therefore it is strongly recommend NOT TO implement this method, or use very wisely.

        Overrides:
        init in class JcmsFormHandler
      • addWarningMsg

        protected void addWarningMsg​(java.lang.String property,
                                     java.lang.Object... params)
        Add a warning message to the current request, using the propert as the message ID for proper validation by unittest.
        Parameters:
        property - the I18N property key
        params - the parameters
      • getRightList

        public java.util.List<java.lang.String> getRightList()
      • getRightLabelList

        public java.util.List<java.lang.String> getRightLabelList()
      • getRightLabel

        public java.lang.String getRightLabel​(java.lang.String rc)
      • isAuthorized

        public boolean isAuthorized()
      • getRightInfo

        public RightInfo getRightInfo()
      • setOpCheck

        public void setOpCheck​(boolean opCheck)
      • setMember

        public void setMember​(java.lang.String v)
      • getAvailableMember

        public Member getAvailableMember()
      • setData

        public void setData​(java.lang.String v)
      • getAvailableData

        public Data getAvailableData()
      • setRight

        public void setRight​(java.lang.String v)
      • getAvailableRight

        public java.lang.String getAvailableRight()
      • canCheckRight

        public static boolean canCheckRight​(Member member,
                                            Data data)
        Verify if the specified member is authorized to check rights of the specified Data.
        Parameters:
        member - the member for which (may be null, in which case return value is always false)
        data - the Data being verified (may be null, in which case return value is always false)
        Returns:
        false if CheckRight is forbidden, true if authorized
        Since:
        jcms-10.0.2 / JCMS-6878
      • showExplanationMessage

        public boolean showExplanationMessage()
      • getExplanationMessage

        public java.lang.String getExplanationMessage()