mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-16 11:57:51 +01:00
enh: file upload user permission
This commit is contained in:
@@ -92,7 +92,7 @@
|
||||
};
|
||||
|
||||
const uploadFileHandler = async (file) => {
|
||||
if (!($user?.permissions?.chat?.file_upload ?? true)) {
|
||||
if ($user?.role !== 'admin' && !($_user?.permissions?.chat?.file_upload ?? true)) {
|
||||
toast.error($i18n.t('You do not have permission to upload files.'));
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user