1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-23 20:37:42 +00:00

feat: metadata insert property permission bug (#7283)

Co-authored-by: 杨国璇 <ygx@Hello-word.local>
This commit is contained in:
杨国璇
2024-12-30 19:00:50 +08:00
committed by GitHub
parent 5d5f2c31f0
commit 324d981420
7 changed files with 16 additions and 9 deletions

View File

@@ -7,12 +7,12 @@ import { MetadataAIOperationsProvider } from './metadata-ai-operation';
// This hook provides content related to seahub interaction, such as whether to enable extended attributes
const MetadataStatusContext = React.createContext(null);
export const MetadataStatusProvider = ({ repoID, currentRepoInfo, hideMetadataView, children }) => {
export const MetadataStatusProvider = ({ repoID, repoInfo, hideMetadataView, children }) => {
const enableMetadataManagement = useMemo(() => {
if (currentRepoInfo?.encrypted) return false;
if (repoInfo?.encrypted) return false;
return window.app.pageOptions.enableMetadataManagement;
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [window.app.pageOptions.enableMetadataManagement, currentRepoInfo]);
}, [window.app.pageOptions.enableMetadataManagement, repoInfo]);
const [isLoading, setLoading] = useState(true);
const [enableMetadata, setEnableMetadata] = useState(false);
@@ -125,7 +125,7 @@ export const MetadataStatusProvider = ({ repoID, currentRepoInfo, hideMetadataVi
enableOCR={enableOCR}
enableTags={enableTags}
tagsLang={tagsLang}
repoInfo={currentRepoInfo}
repoInfo={repoInfo}
>
{children}
</MetadataAIOperationsProvider>