Merge branch 'master' into develop
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
This commit is contained in:
@@ -2694,12 +2694,21 @@ public class PvmService {
|
|||||||
public PvmAuthorizationDTO getAuthorization(String section, String authName) throws Exception {
|
public PvmAuthorizationDTO getAuthorization(String section, String authName) throws Exception {
|
||||||
String username = requestDataDTO.getUsername();
|
String username = requestDataDTO.getUsername();
|
||||||
|
|
||||||
String sql = "SELECT dw_name AS module, dw_colname AS authorization_name, display_only as editable, enabled, visible\n" +
|
String sql = Query.format(
|
||||||
|
"SELECT dw_name AS module,\n" +
|
||||||
|
" dw_colname AS authorization_name,\n" +
|
||||||
|
" CAST(IIF(enabled IS NULL, 1, IIF(enabled = 'S', 1, 0)) AS BIT) AS enabled,\n" +
|
||||||
|
" CAST(IIF(visible IS NULL, 1, IIF(visible = 'S', 1, 0)) AS BIT) AS visible,\n" +
|
||||||
|
" CAST(IIF(required IS NULL, 0, IIF(required = 'S', 1, 0)) AS BIT) AS required\n" +
|
||||||
"FROM stb_edit_limit\n" +
|
"FROM stb_edit_limit\n" +
|
||||||
"WHERE gest_name = 'PVM'\n" +
|
"WHERE gest_name = 'PVM'\n" +
|
||||||
" AND dw_name = " + UtilityDB.valueToString(section) + "\n" +
|
" AND dw_name = %s\n" +
|
||||||
" AND dw_colname = " + UtilityDB.valueToString(authName) + "\n" +
|
" AND dw_colname = %s\n" +
|
||||||
" AND user_name = " + UtilityDB.valueToString(username) + " ";
|
" AND user_name = %s",
|
||||||
|
section,
|
||||||
|
authName,
|
||||||
|
username
|
||||||
|
);
|
||||||
|
|
||||||
return UtilityDB.executeSimpleQueryOnlyFirstRowDTO(multiDBTransactionManager.getPrimaryConnection(), sql, PvmAuthorizationDTO.class);
|
return UtilityDB.executeSimpleQueryOnlyFirstRowDTO(multiDBTransactionManager.getPrimaryConnection(), sql, PvmAuthorizationDTO.class);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user