getLinkIfAllowed

@Query(value = ""SELECT l.* FROM " + LINKS_KEY + " AS l WHERE l." + OWNER_KEY + "=:" + USER_IDENTIFIER_KEY + " AND " + LINK_IDENTIFIER_KEY + "=:" + LINK_IDENTIFIER_KEY", nativeQuery = true)
abstract fun getLinkIfAllowed(@Param(value = "user_id") userId: String, @Param(value = "link_id") linkId: String): CustomRefyLink

Method to execute the query to get a custom link if the owner is authorized

Return

the custom link if the user is authorized as CustomRefyLink

Parameters

userId

: the identifier of the user

linkId

: the link identifier