diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2016-10-16 23:02:45 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2016-10-16 23:16:37 +0200 |
commit | 6189f1973d24799939b1d689a3242820e2494da6 (patch) | |
tree | 6dd48509b947b07a9788d9ac30fe8be85768bbea /sonar-db/src/main/resources/org/sonar | |
parent | 25a69084fff50608f9996efd3ffc1245df219a84 (diff) | |
download | sonarqube-6189f1973d24799939b1d689a3242820e2494da6.tar.gz sonarqube-6189f1973d24799939b1d689a3242820e2494da6.zip |
SONAR-8272 SONAR-8273 organization in WS to apply permission templates
Diffstat (limited to 'sonar-db/src/main/resources/org/sonar')
2 files changed, 6 insertions, 13 deletions
diff --git a/sonar-db/src/main/resources/org/sonar/db/permission/template/PermissionTemplateCharacteristicMapper.xml b/sonar-db/src/main/resources/org/sonar/db/permission/template/PermissionTemplateCharacteristicMapper.xml index 00050a13f19..13664b4293e 100644 --- a/sonar-db/src/main/resources/org/sonar/db/permission/template/PermissionTemplateCharacteristicMapper.xml +++ b/sonar-db/src/main/resources/org/sonar/db/permission/template/PermissionTemplateCharacteristicMapper.xml @@ -10,15 +10,6 @@ ptc.updated_at as updatedAt </sql> - <select id="selectByTemplateId" parameterType="long" resultType="PermissionTemplateCharacteristic"> - select - <include refid="columns" /> - from perm_tpl_characteristics ptc - where - ptc.template_id = #{templateId} - order by id - </select> - <select id="selectByTemplateIds" parameterType="long" resultType="PermissionTemplateCharacteristic"> select <include refid="columns" /> diff --git a/sonar-db/src/main/resources/org/sonar/db/permission/template/PermissionTemplateMapper.xml b/sonar-db/src/main/resources/org/sonar/db/permission/template/PermissionTemplateMapper.xml index 13eaa7be8a3..8d4e454219c 100644 --- a/sonar-db/src/main/resources/org/sonar/db/permission/template/PermissionTemplateMapper.xml +++ b/sonar-db/src/main/resources/org/sonar/db/permission/template/PermissionTemplateMapper.xml @@ -175,11 +175,13 @@ ORDER BY UPPER(name), name </select> - <select id="selectByName" parameterType="String" resultType="PermissionTemplate"> - SELECT + <select id="selectByName" parameterType="map" resultType="PermissionTemplate"> + select <include refid="templateColumns"/> - FROM permission_templates - WHERE UPPER(name)=#{templateName} + from permission_templates + where + organization_uuid = #{organizationUuid,jdbcType=VARCHAR} and + upper(name) = #{name,jdbcType=VARCHAR} </select> <sql id="permissionTemplateUserColumns"> |