get
Team
If
Allowed
@Query(value = "SELECT t.* " + "FROM " + TEAMS_KEY + " as t INNER JOIN " + MEMBERS_KEY
+ " ON t." + TEAM_IDENTIFIER_KEY + "=" + MEMBERS_KEY + "." + TEAM_IDENTIFIER_KEY
+ " WHERE " + MEMBERS_KEY + "." + OWNER_KEY + "=:" + USER_IDENTIFIER_KEY
+ " AND t." + TEAM_IDENTIFIER_KEY + "=:" + TEAM_IDENTIFIER_KEY + " LIMIT 1",
nativeQuery = true
)
Method to execute the query to get a team if the user is authorized
Return
the team if the user is authorized as Team
Parameters
userId
The identifier of the user
teamId
The team identifier