Class UserShareTypeValidator

java.lang.Object
com.atlassian.jira.sharing.type.UserShareTypeValidator
All Implemented Interfaces:
ShareTypeValidator

public class UserShareTypeValidator extends Object implements ShareTypeValidator
Since:
v7.12
  • Constructor Details

  • Method Details

    • checkSearchParameter

      public boolean checkSearchParameter(JiraServiceContext ctx, ShareTypeSearchParameter searchParameter)
      Checks if user key passed in search parameter is an existing user.
      Specified by:
      checkSearchParameter in interface ShareTypeValidator
      Parameters:
      ctx - The service context that contains the user trying to store permissions, the i18n bean and the error collection
      searchParameter - the parameter to check, must contain user key
      Returns:
      true if user exists, false otherwise
    • checkSharePermission

      public boolean checkSharePermission(JiraServiceContext ctx, SharePermission permission)
      Checks if current user has proper permissions and user to be shared with exists
      Specified by:
      checkSharePermission in interface ShareTypeValidator
      Parameters:
      ctx - The service context that contains the user trying to store permissions, the i18n bean and the error collection
      permission - the SharePermission to check, must contain first parameter
      Returns:
      true if current user has permission to create share objects and user to be shared with exists, false otherwise