Class AbstractCheckRightsRequest

  • All Implemented Interfaces:
    Serializable, org.xwiki.job.Request

    public abstract class AbstractCheckRightsRequest
    extends org.xwiki.job.AbstractRequest
    Define a request that have rights to check.
    Since:
    10.10RC1, 10.8.2, 9.11.9
    Version:
    $Id: a69974f5270afcc6f1903d41da39bc4c1607bf70 $
    See Also:
    Serialized Form
    • Constructor Detail

      • AbstractCheckRightsRequest

        public AbstractCheckRightsRequest()
        Default constructor.
      • AbstractCheckRightsRequest

        protected AbstractCheckRightsRequest​(org.xwiki.job.Request request)
        Parameters:
        request - the request to copy
        Since:
        14.7RC1, 14.4.4, 13.10.9
    • Method Detail

      • isCheckAuthorRights

        public boolean isCheckAuthorRights()
        Returns:
        true in case the job should check if the author specified by getAuthorReference() is authorized to perform the actions implied by this request, false otherwise
      • setCheckAuthorRights

        public void setCheckAuthorRights​(boolean checkAuthorRights)
        Sets whether the job should check or not if the user specified by getAuthorReference() is authorized to perform the actions implied by this request.
        Parameters:
        checkAuthorRights - true to check if getAuthorReference() is authorized to perform this request, false to perform this request without checking rights
      • isCheckRights

        public boolean isCheckRights()
        Returns:
        true in case the job should check if the user specified by getUserReference() is authorized to perform the actions implied by this request, false otherwise
      • setCheckRights

        public void setCheckRights​(boolean checkRights)
        Sets whether the job should check or not if the user specified by getUserReference() is authorized to perform the actions implied by this request.
        Parameters:
        checkRights - true to check if getUserReference() is authorized to perform this request, false to perform this request without checking rights
      • getUserReference

        public DocumentReference getUserReference()
        Returns:
        the user that should be used to perform this request; this user must be authorized to perform the actions implied by this request if isCheckRights() is true.
      • setUserReference

        public void setUserReference​(DocumentReference userReference)
        Sets the user that should be used to perform this request. This user must be authorized to perform the actions implied by this request if isCheckRights() is true.
        Parameters:
        userReference - the user reference
      • getAuthorReference

        public DocumentReference getAuthorReference()
        Returns:
        the author of the script which is performing the request; this user must be authorized to perform the actions implied by this request if isCheckRights() is true.
      • setAuthorReference

        public void setAuthorReference​(DocumentReference authorReference)
        Sets the author of the script which is performing the request. This user must be authorized to perform the actions implied by this request if isCheckRights() is true.
        Parameters:
        authorReference - the author reference