Skip to content

Commit 4592d7b

Browse files
committed
Removed tree labels from database translation api
1 parent 61a8a14 commit 4592d7b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/main/java/cc/altius/FASP/dao/impl/LabelDaoImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public int addLabel(Label label, int sourceId, int curUser) {
7878
public List<DatabaseTranslationsDTO> getDatabaseLabelsList(CustomUserDetails curUser) {
7979
Map<String, Object> params = new HashMap<>();
8080
StringBuilder sb = new StringBuilder("SELECT l2.LABEL_ID, l2.LABEL_EN, l2.LABEL_FR, l2.LABEL_SP, l2.LABEL_PR, l2.LABEL_FOR, l2.ID, l2.REALM_ID, l2.PROGRAM_ID, l2.RELATED_TO_LABEL_ID, l2.RELATED_TO_LABEL_EN, l2.RELATED_TO_LABEL_FR, l2.RELATED_TO_LABEL_SP, l2.RELATED_TO_LABEL_PR FROM (SELECT "
81-
+ " l.LABEL_ID, l.LABEL_EN, l.LABEL_FR, l.LABEL_SP, l.LABEL_PR, "
81+
+ " l.LABEL_ID, l.LABEL_EN, l.LABEL_FR, l.LABEL_SP, l.LABEL_PR, l.SOURCE_ID, "
8282
+ " ls.`SOURCE_DESC` AS `LABEL_FOR`, "
8383
+ " IFNULL(COALESCE( "
8484
+ " c.COUNTRY_ID, r.REALM_ID, c2.CURRENCY_ID, d.DIMENSION_ID, vt.VERSION_TYPE_ID, "
@@ -168,7 +168,7 @@ public List<DatabaseTranslationsDTO> getDatabaseLabelsList(CustomUserDetails cur
168168
+ "LEFT JOIN vw_tree_template tt3 ON ttl.TREE_TEMPLATE_ID=tt3.TREE_TEMPLATE_ID "
169169
+ ") AS l2 "
170170
+ "LEFT JOIN rm_program p ON l2.PROGRAM_ID=p.PROGRAM_ID "
171-
+ "WHERE l2.ID IS NOT NULL AND l2.LABEL_FOR IS NOT NULL ");
171+
+ "WHERE l2.SOURCE_ID NOT IN (45,46,48,49,50,53,54) AND l2.ID IS NOT NULL AND l2.LABEL_FOR IS NOT NULL ");
172172
if (curUser.getBusinessFunction().contains(new SimpleGrantedAuthority("ROLE_BUSINESS_FUNCTION_EDIT_APPLICATION_LABELS"))) {
173173
sb.append(" AND l2.REALM_ID = 0 ");
174174
} else if (curUser.getBusinessFunction().contains(new SimpleGrantedAuthority("ROLE_BUSINESS_FUNCTION_EDIT_REALM_LABELS"))) {

0 commit comments

Comments
 (0)