Class CheckPermissionTag

  • All Implemented Interfaces:
    Serializable, javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

    public class CheckPermissionTag
    extends javax.servlet.jsp.tagext.BodyTagSupport
    Implements the wmedit:checkPermission tag. Checks whether the current user has a certain permission, which is specified by parameter 'value'. There are two ways of using this tag. Firstly, you can use it to conditionallyrender the body of the tag. Secondly, the result of the check can be placed in the pageContext under the key specified by the optional parameter 'var'. When passing an optional WorkflowEnabled object, the checkAccess will grant permissions based on this object. Examples:
            <wm:checkPermission value="page_models_use" >JSP Body</wm:checkPermission>
            <wm:checkPermission var="authorization" value="page_models_use" />
     
    Author:
    bartk
    See Also:
    Serialized Form
    • Constructor Detail

      • CheckPermissionTag

        public CheckPermissionTag()
    • Method Detail

      • setWorkflowenabled

        public void setWorkflowenabled​(WorkflowEnabled workflowenabler)
      • setWorkflowModel

        public void setWorkflowModel​(WorkflowModel workflowModel)
        Sets the WorkflowModel passed by the workflowModel parameter on this object. When this is set the permission check returns true if the permission is available to the current user and assigned to the initiator activity of the workflowModel's workflow repository model.
        Parameters:
        workflowModel - a WorkflowModel object
      • setValue

        public void setValue​(String value)
      • getValue

        public String getValue()
      • setWebsite

        public void setWebsite​(String website)
      • getWebsite

        public String getWebsite()
      • setVar

        public void setVar​(String var)
      • getVar

        public String getVar()
      • doStartTag

        public int doStartTag()
                       throws javax.servlet.jsp.JspException
        Specified by:
        doStartTag in interface javax.servlet.jsp.tagext.Tag
        Overrides:
        doStartTag in class javax.servlet.jsp.tagext.BodyTagSupport
        Throws:
        javax.servlet.jsp.JspException