Skip to content

Conversation

@Ryosei-Fukushima
Copy link
Contributor

@Ryosei-Fukushima Ryosei-Fukushima commented Dec 3, 2025

redmine
https://redmine.weseek.co.jp/issues/175195

設定値の作成

config-definition.ts で新しい設定キーを追加し、デフォルト値を変更することで、新規ユーザーをデフォルトで readOnly にできることを確認しました。

@Ryosei-Fukushima Ryosei-Fukushima changed the title define default user role for new user faet: define default user role for new user Dec 3, 2025

// Customize Settings
'customize:isEmailPublishedForNewUser',
'customize:isReadOnlyForNewUser',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

この Prefix (customize:) は Admin 画面のどのページで管理するかという指定方法になっている。この場合は「カスタマイズ設定」になる。

初期 user を readOnly で作成する設定は「カスタマイズ設定」よりかは「アプリ設定」の方が良さそう。

UI でいうとここら辺かな。

Image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ありがとうございます。修正しました。

}

newUser.readOnly =
configManager.getConfig('customize:isReadOnlyForNewUser') ?? false;
Copy link
Member

@miya miya Dec 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

configManager.getConfig('customize:isReadOnlyForNewUser') は null を許容していない (true or false が返却される) と思うので ?? false は不要そう

@yuki-takei yuki-takei merged commit 87fa352 into feat/174791-default-user-role-setting-api Dec 4, 2025
14 checks passed
@yuki-takei yuki-takei deleted the feat/174791-175195-define-default-user-role-for-new-users branch December 4, 2025 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants