Commit fcb846ea by Masaru Abe

#13224 PW変更 更新禁止時、許可グループユーザはPW変更可能にする

parent 5ee3396a
...@@ -2250,3 +2250,35 @@ function ToogleLogoutNortice() { ...@@ -2250,3 +2250,35 @@ function ToogleLogoutNortice() {
avwSetLogoutNortice(); avwSetLogoutNortice();
} }
}; };
//パスワード変更禁止でも許可グループに所属しているかAPIで確認する
function canPasswordChange( changePw, paramSid ) {
if( changePw != 'N' ){
return true;
}
if( !paramSid ){
paramSid = ClientData.userInfo_sid();
}
var result = false;
var params = {
sid: paramSid
};
var sysSettings = avwSysSetting();
avwCmsApiSyncWithUrl(sysSettings.apiUrl, ClientData.userInfo_accountPath(), 'allowPWChange', 'GET', params,
function (data) {
if (data.result == 'OK') {
result = true;
}
},
function (xhr, b, c) {
//エラー 変更不可にする
}
);
return result;
};
...@@ -35,7 +35,7 @@ $(document).ready(function () { ...@@ -35,7 +35,7 @@ $(document).ready(function () {
ClientData.BookmarkScreen(ScreenIds.BookmarkList); ClientData.BookmarkScreen(ScreenIds.BookmarkList);
//Check if Force Change password //Check if Force Change password
if(ClientData.requirePasswordChange() != 1 || ClientData.serviceOpt_change_pw() == 'N'){ if(ClientData.requirePasswordChange() != 1 || canPasswordChange(ClientData.serviceOpt_change_pw()) == false ){
// Synchronize bookmarks with server // Synchronize bookmarks with server
SyncContent(); SyncContent();
......
...@@ -53,7 +53,7 @@ $(document).ready(function(){ ...@@ -53,7 +53,7 @@ $(document).ready(function(){
ClientData.BookmarkScreen(ScreenIds.ContentSearch); ClientData.BookmarkScreen(ScreenIds.ContentSearch);
//Check if Force Change password //Check if Force Change password
if(ClientData.requirePasswordChange() != 1 || ClientData.serviceOpt_change_pw() == 'N'){ if(ClientData.requirePasswordChange() != 1 || canPasswordChange(ClientData.serviceOpt_change_pw()) == false){
//Format text display more record //Format text display more record
formatDisplayMoreRecord(); formatDisplayMoreRecord();
......
...@@ -52,7 +52,7 @@ $(document).ready(function(){ ...@@ -52,7 +52,7 @@ $(document).ready(function(){
ClientData.BookmarkScreen(ScreenIds.History); ClientData.BookmarkScreen(ScreenIds.History);
if(ClientData.requirePasswordChange() != 1 || ClientData.serviceOpt_change_pw() == 'N'){ if(ClientData.requirePasswordChange() != 1 || canPasswordChange(ClientData.serviceOpt_change_pw()) == false){
if(ClientData.ReadingContentIds() == null || ClientData.ReadingContentIds() == 'undefined' || ClientData.ReadingContentIds().length == 0){ if(ClientData.ReadingContentIds() == null || ClientData.ReadingContentIds() == 'undefined' || ClientData.ReadingContentIds().length == 0){
}else{ }else{
syncReadingContent(); syncReadingContent();
......
...@@ -59,7 +59,7 @@ $(document).ready(function () { ...@@ -59,7 +59,7 @@ $(document).ready(function () {
ClientData.BookmarkScreen(ScreenIds.Home); ClientData.BookmarkScreen(ScreenIds.Home);
//Check if Force Change password //Check if Force Change password
if (ClientData.requirePasswordChange() != 1 || ClientData.serviceOpt_change_pw() == 'N' ) { if (ClientData.requirePasswordChange() != 1 || canPasswordChange(ClientData.serviceOpt_change_pw()) == false) {
// Register log // Register log
RegisterLog(); RegisterLog();
......
...@@ -232,12 +232,11 @@ function processLogin() { ...@@ -232,12 +232,11 @@ function processLogin() {
$('#main-error-message').css('display', 'none'); $('#main-error-message').css('display', 'none');
if (data.requirePasswordChange == 0 || change_pw == 'N' ) { if (data.requirePasswordChange == 0 || canPasswordChange(change_pw, ClientData.userInfo_sid_local()) == false ) {
ClientData.userInfo_sid(ClientData.userInfo_sid_local()); ClientData.userInfo_sid(ClientData.userInfo_sid_local());
avwScreenMove("abvw/" + ScreenIds.Home); avwScreenMove("abvw/" + ScreenIds.Home);
} }
else if (data.requirePasswordChange == 1) { else if (data.requirePasswordChange == 1) {
if (force_pw_change_on_login == 2) { // force to change password if (force_pw_change_on_login == 2) { // force to change password
OpenChangePasswordDialog(); OpenChangePasswordDialog();
$(".ui-dialog-titlebar").hide(); $(".ui-dialog-titlebar").hide();
......
...@@ -59,8 +59,8 @@ $(document).ready(function () { ...@@ -59,8 +59,8 @@ $(document).ready(function () {
$("#dspOptBk").hide(); $("#dspOptBk").hide();
} }
if ( ClientData.serviceOpt_change_pw() == 'N' ) { if ( canPasswordChange(ClientData.serviceOpt_change_pw()) == true ) {
$("#dspPwdUpd").hide(); $("#dspPwdUpd").css('visibility', '');
} else { } else {
// Get flag to determine must change password // Get flag to determine must change password
avwCmsApi(ClientData.userInfo_accountPath(), "requirePasswordChange", 'GET', { sid: ClientData.userInfo_sid() }, avwCmsApi(ClientData.userInfo_accountPath(), "requirePasswordChange", 'GET', { sid: ClientData.userInfo_sid() },
......
...@@ -90,7 +90,7 @@ ...@@ -90,7 +90,7 @@
<div class="lang label" lang="txtLoginAccPath">アカウントパス:</div><div class="show" id="txtLoginPath">...</div> <div class="lang label" lang="txtLoginAccPath">アカウントパス:</div><div class="show" id="txtLoginPath">...</div>
<br /> <br />
<div class="lang label" lang="txtLastLoginTime">最終ログイン時間:</div><div class="show" id="txtLastLoginTime">...</div> <div class="lang label" lang="txtLastLoginTime">最終ログイン時間:</div><div class="show" id="txtLastLoginTime">...</div>
<p class="passchgbtn"><a href="#" class="lang" id="dspPwdUpd" lang="dspPwdUpd">パスワード変更</a></p> <p class="passchgbtn"><a href="#" class="lang" id="dspPwdUpd" lang="dspPwdUpd" style="visibility:hidden;" >パスワード変更</a></p>
</div> </div>
<div id="user_option"> <div id="user_option">
<h3 class="lang" lang="txtOpt">オプション</h3> <h3 class="lang" lang="txtOpt">オプション</h3>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment