All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.payneteasy.superfly.jira.JiraUtils Maven / Gradle / Ivy

There is a newer version: 1.6-5
Show newest version
package com.payneteasy.superfly.jira;

import com.payneteasy.superfly.api.SSOAction;
import com.payneteasy.superfly.api.SSOUserWithActions;

/**
 * Code used by the library.
 * 
 * @author Roman Puchkovskiy
 */
public class JiraUtils {
	private JiraUtils() {}

	/**
	 * Returns true if a user has requested action.
	 * 
	 * @param user			user
	 * @param actionName	name of the action to check
	 * @return true if user has this action
	 */
	public static boolean userHasAction(SSOUserWithActions user, String actionName) {
		boolean result = false;
		for (SSOAction action : user.getActions()) {
			if (actionName.equals(action.getName())) {
				result = true;
				break;
			}
		}
		return result;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy