mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-04 21:19:27 +08:00
fix: only export action in view collection is support when writableView is false (#6763)
This commit is contained in:
parent
717177b471
commit
04e17444fa
@ -334,8 +334,11 @@ export const ACLActionProvider = (props) => {
|
||||
if (!params) {
|
||||
return <ACLActionParamsContext.Provider value={params}>{props.children}</ACLActionParamsContext.Provider>;
|
||||
}
|
||||
//视图表无编辑权限时不显示
|
||||
if (resourceActionPath.includes(actionPath) || resourceActionPath.includes(actionPath?.split(':')[1])) {
|
||||
//视图表无编辑权限时仅支持显示导出按钮
|
||||
if (
|
||||
['create', 'update', 'destroy', 'importXlsx'].includes(actionPath) ||
|
||||
['create', 'update', 'destroy', 'importXlsx'].includes(actionPath?.split(':')[1])
|
||||
) {
|
||||
if ((collection && collection.template !== 'view') || collection?.writableView) {
|
||||
return <ACLActionParamsContext.Provider value={params}>{props.children}</ACLActionParamsContext.Provider>;
|
||||
}
|
||||
@ -343,7 +346,6 @@ export const ACLActionProvider = (props) => {
|
||||
}
|
||||
return <ACLActionParamsContext.Provider value={params}>{props.children}</ACLActionParamsContext.Provider>;
|
||||
};
|
||||
|
||||
export const useACLFieldWhitelist = () => {
|
||||
const params = useContext(ACLActionParamsContext);
|
||||
const whitelist = useMemo(() => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user