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

org.ligoj.bootstrap.dao.system.SystemRoleAssignmentRepository Maven / Gradle / Ivy

There is a newer version: 3.1.26
Show newest version
/*
 * Licensed under MIT (https://github.com/ligoj/ligoj/blob/master/LICENSE)
 */
package org.ligoj.bootstrap.dao.system;

import java.util.List;

import org.ligoj.bootstrap.core.dao.RestRepository;
import org.ligoj.bootstrap.model.system.SystemRole;
import org.ligoj.bootstrap.model.system.SystemRoleAssignment;
import org.springframework.data.jpa.repository.Query;

/**
 * SystemRoleAssignment repository.
 */
public interface SystemRoleAssignmentRepository extends RestRepository {

	/**
	 * Return all roles whatever the context, date or applied resource.
	 * 
	 * @param login
	 *            the user login.
	 * @return all roles whatever the context, date or applied resource.
	 */
	@Query("SELECT DISTINCT sra.role FROM SystemRoleAssignment sra WHERE sra.user.login = ?1")
	List findAllRolesByLogin(String login);

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy