Skip to content

Commit

Permalink
パスワードの再設定間隔
Browse files Browse the repository at this point in the history
  • Loading branch information
seto1 committed Mar 26, 2024
1 parent cb20131 commit baf63de
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,4 @@ q {}","",""
"28","outer_service_output_header","","",""
"29","outer_service_output_footer","","",""
"30","allow_simple_password","0","",""
"31","password_reset_days","","",""
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,4 @@ q {}","",""
"28","outer_service_output_header","","",""
"29","outer_service_output_footer","","",""
"30","allow_simple_password","0","",""
"31","password_reset_days","","",""
7 changes: 7 additions & 0 deletions plugins/baser-core/config/Seeds/SiteConfigsSeed.php
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,13 @@ public function run(): void
'created' => '',
'modified' => ''
],
[
'id' => '31',
'name' => 'password_reset_days',
'value' => '',
'created' => '',
'modified' => ''
],
];
$table = $this->table('site_configs');
$table->insert($data)->save();
Expand Down
3 changes: 3 additions & 0 deletions plugins/baser-core/src/Model/Table/SiteConfigsTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ public function validationKeyValue(Validator $validator): Validator
'provider' => 'siteConfig',
'message' => __d('baser_core', '管理画面をSSLで利用するには、SSL用のWebサイトURLを入力してください。')
]]);
$validator
->allowEmptyString('password_reset_days')
->nonNegativeInteger('password_reset_days', __d('baser_core', 'パスワードの再設定日数は0以上の整数を入力してください。'));
return $validator;
}

Expand Down
16 changes: 16 additions & 0 deletions plugins/bc-admin-third/templates/Admin/SiteConfigs/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,22 @@
<?php echo $this->BcAdminForm->error('allow_simple_password') ?>
</td>
</tr>
<tr>
<th class="col-head bca-form-table__label">
<?php echo $this->BcAdminForm->label('password_reset_days', __d('baser_core', 'ログインパスワードの再設定日数')) ?>
</th>
<td class="col-input bca-form-table__input">

<?php echo $this->BcAdminForm->control('password_reset_days', [
'type' => 'text',
'size' => 10,
'maxlength' => 255
]) ?>
<i class="bca-icon--question-circle bca-help"></i>
<div class="bca-helptext"><?php echo __d('baser_core', 'ユーザーのパスワードが設定した日数以上更新されていない場合に再設定画面を表示します。再設定を行うまで管理画面の利用は不可となります。') ?></div>
<?php echo $this->BcAdminForm->error('password_reset_days') ?>
</td>
</tr>

<?php echo $this->BcAdminForm->dispatchAfterForm('Admin') ?>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,4 @@ q {}","",""
"28","outer_service_output_header","","",""
"29","outer_service_output_footer","","",""
"30","allow_simple_password","0","",""
"31","password_reset_days","","",""

0 comments on commit baf63de

Please sign in to comment.