Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Create ReadOnly user components #7610

Merged
merged 7 commits into from
Apr 29, 2023

Conversation

jam411
Copy link
Contributor

@jam411 jam411 commented Apr 28, 2023

@jam411 jam411 requested a review from yuki-takei April 28, 2023 07:27
<i className="icon-fw icon-user-following"></i> {t('user_management.user_table.give_read_only_access')}
</button>
);
};
Copy link
Member

Choose a reason for hiding this comment

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

別に管理者自身も ROM にできていいと思うよ

Copy link
Contributor Author

@jam411 jam411 Apr 28, 2023

Choose a reason for hiding this comment

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

管理者も ROM にできるように修正しました。

細かいですが、
Read Only Member でなく Read Only User (日本語では”閲覧ユーザー")として作ってしまったのですが、
Read Only Member (日本語では "閲覧メンバー" )の方がよいでしょうか。

@yuki-takei
Copy link
Member

https://redmine.weseek.co.jp/issues/121257 はこの PR のスコープに入ってるの?

@jam411
Copy link
Contributor Author

jam411 commented Apr 28, 2023

https://redmine.weseek.co.jp/issues/121257 はこの PR のスコープに入ってるの?

はい。この PR に含めました。
「閲覧ユーザー」のバッジ作成です。
image

<li>
{user.readOnly === true && <RemoveReadOnlyMenuItem user={user} />}
{user.readOnly === false && <GiveReadOnlyButton user={user} />}
</li>
Copy link
Member

Choose a reason for hiding this comment

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

前バージョンからアップグレードしたシステムだと user.readOnly が undefined というケースがある。その場合両方のメニューが表示されないことになってしまうので、三項演算子の方がよさそう。

一方 admin は必ず T/F のどちらかが入っているが、可読性を考慮して書式を揃えてもよい。

@jam411 jam411 merged commit 3443f8b into feat/120698-read-only-user Apr 29, 2023
@jam411 jam411 deleted the feat/120698-120954-rom-user-client branch April 29, 2023 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants