Fix access control on view searching and handle errors when fetching view definitions
This commit is contained in:
parent
c115a87cd6
commit
abc072cbbe
|
@ -25,6 +25,10 @@ export default class ViewV2Fetch extends DataFetch {
|
|||
const res = await this.API.viewV2.fetchDefinition(datasource.id)
|
||||
return res?.data
|
||||
} catch (error) {
|
||||
this.store.update(state => ({
|
||||
...state,
|
||||
error,
|
||||
}))
|
||||
return null
|
||||
}
|
||||
}
|
||||
|
|
|
@ -269,6 +269,7 @@ router
|
|||
|
||||
router.post(
|
||||
"/api/v2/views/:viewId/search",
|
||||
paramResource("viewId"),
|
||||
authorized(PermissionType.TABLE, PermissionLevel.READ),
|
||||
rowController.views.searchView
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue