mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-16 15:35:31 +01:00
fix: update agent permission check logic in AgentPanel to simplify condition
This commit is contained in:
parent
770c810650
commit
4c40469951
3 changed files with 4 additions and 2 deletions
|
|
@ -280,12 +280,12 @@ export default function AgentPanel({
|
|||
return true;
|
||||
}
|
||||
|
||||
if (agentQuery.data?.author === user?.id || user?.role === SystemRoles.ADMIN) {
|
||||
if (user?.role === SystemRoles.ADMIN) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return canEdit;
|
||||
}, [agentQuery.data?.author, agentQuery.data?.id, user?.id, user?.role, canEdit]);
|
||||
}, [agentQuery.data?.id, user?.id, user?.role, canEdit]);
|
||||
|
||||
return (
|
||||
<FormProvider {...methods}>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue