Skip to content

Commit 74c6341

Browse files
Merge branch 'dev' into 'main'
fix: hide update encryption for user not cystack See merge request locker/web-selfhosted!138
2 parents 54103b0 + 27a9b5a commit 74c6341

2 files changed

Lines changed: 10 additions & 3 deletions

File tree

src/components/common/NoticeCards.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ function NoticeCards(props) {
3232
}, [myShares])
3333

3434
const isEncryptionUpdate = useMemo(() => {
35-
return userInfo.kdf === global.constants.CORE_JS_INFO.KDF && userInfo.kdf_iterations < global.constants.CORE_JS_INFO.KDF_ITERATIONS
35+
return userInfo.kdf === global.constants.CORE_JS_INFO.KDF && userInfo.kdf_iterations < global.constants.CORE_JS_INFO.KDF_ITERATIONS && userInfo.kdf_version >= 1
3636
}, [userInfo])
3737

3838
useEffect(() => {

src/pages/admin/settings/settings-security.jsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import React, { useState } from "react";
2+
import { useSelector } from 'react-redux';
23
import { useTranslation } from "react-i18next";
34

45
import { Divider } from '@lockerpm/design';
@@ -25,6 +26,8 @@ const Security = (props) => {
2526
const { } = props;
2627
const { t } = useTranslation();
2728
const [expand, setExpand] = useState(false);
29+
30+
const userInfo = useSelector(state => state.auth.userInfo);
2831

2932
return (
3033
<div className="layout-content">
@@ -60,8 +63,12 @@ const Security = (props) => {
6063
</div>
6164
}
6265
</div>
63-
<Divider />
64-
<EncryptionKeySettings />
66+
{
67+
userInfo?.kdf_version >= 1 && <>
68+
<Divider />
69+
<EncryptionKeySettings />
70+
</>
71+
}
6572
<Divider />
6673
<TwoFA />
6774
<Divider />

0 commit comments

Comments
 (0)