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)
|
const res = await this.API.viewV2.fetchDefinition(datasource.id)
|
||||||
return res?.data
|
return res?.data
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
this.store.update(state => ({
|
||||||
|
...state,
|
||||||
|
error,
|
||||||
|
}))
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -269,6 +269,7 @@ router
|
||||||
|
|
||||||
router.post(
|
router.post(
|
||||||
"/api/v2/views/:viewId/search",
|
"/api/v2/views/:viewId/search",
|
||||||
|
paramResource("viewId"),
|
||||||
authorized(PermissionType.TABLE, PermissionLevel.READ),
|
authorized(PermissionType.TABLE, PermissionLevel.READ),
|
||||||
rowController.views.searchView
|
rowController.views.searchView
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue