Plugin Meta Updates Need to Be Published
jonwinton opened this issue · 0 comments
jonwinton commented
Updates to the meta object of pages/layouts from plugins need to be:
- Controlled as to not allow overriding of core data
- Trigger a meta update bus event every time.
Idea: plugins get two three db methods:
getMeta
: can retrieve the meta objectpatchMeta
: should be allowed to set/change certain properties (not protected properties)raw
: allows for configuration of schema/tables/inserts/etc (https://knexjs.org/#Raw)
Problem: exposing the raw
query potentially allows a plugin to truly mess up the DB, but a plugin can do that anyways if it just wants to connect to the DB itself. Maybe the solution is only to provide meta helpers but not raw? it'd be a shame for one clay instance to have a client for every plugin though.