Commit fcb846ea by Masaru Abe

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

parent 5ee3396a
......@@ -2250,3 +2250,35 @@ function ToogleLogoutNortice() {
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 () {
ClientData.BookmarkScreen(ScreenIds.BookmarkList);
//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
SyncContent();
......
......@@ -53,7 +53,7 @@ $(document).ready(function(){
ClientData.BookmarkScreen(ScreenIds.ContentSearch);
//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
formatDisplayMoreRecord();
......
......@@ -52,7 +52,7 @@ $(document).ready(function(){
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){
}else{
syncReadingContent();
......
......@@ -59,7 +59,7 @@ $(document).ready(function () {
ClientData.BookmarkScreen(ScreenIds.Home);
//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
RegisterLog();
......
......@@ -232,12 +232,11 @@ function processLogin() {
$('#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());
avwScreenMove("abvw/" + ScreenIds.Home);
}
else if (data.requirePasswordChange == 1) {
if (force_pw_change_on_login == 2) { // force to change password
OpenChangePasswordDialog();
$(".ui-dialog-titlebar").hide();
......
......@@ -59,8 +59,8 @@ $(document).ready(function () {
$("#dspOptBk").hide();
}
if ( ClientData.serviceOpt_change_pw() == 'N' ) {
$("#dspPwdUpd").hide();
if ( canPasswordChange(ClientData.serviceOpt_change_pw()) == true ) {
$("#dspPwdUpd").css('visibility', '');
} else {
// Get flag to determine must change password
avwCmsApi(ClientData.userInfo_accountPath(), "requirePasswordChange", 'GET', { sid: ClientData.userInfo_sid() },
......
......@@ -90,7 +90,7 @@
<div class="lang label" lang="txtLoginAccPath">アカウントパス:</div><div class="show" id="txtLoginPath">...</div>
<br />
<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 id="user_option">
<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