-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ability to disable metadata #62
Comments
Hi Mark,
That's a great idea, there should be an option to switch that functionality
off at least.
Make a PR and I'll deploy it as soon as I can.
Cheers,
Ben
…On Mon, 25 Nov. 2019, 7:33 am Mark Lipscombe, ***@***.***> wrote:
Currently, several metadata fields are automatically created/updated, like
createdate, lastupdate, createdby and updatedby. This leaks information
(for example, the email addresses of admin users) into documents that may
be publicly accessible, and should be able to be disabled.
I can make a PR to add an option like nometadata if that would be
acceptable.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#62?email_source=notifications&email_token=ACZ4TPS2EBE6A2OX2BIXEGTQVLTZDA5CNFSM4JRA6SK2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4H3U5NOA>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACZ4TPQECMVZSTMGYIUY5S3QVLTZDANCNFSM4JRA6SKQ>
.
|
I agree this would be beneficial. Or even being able to pass an array of fields you want to use (in case you want
|
I agree. This is a privacy issue and makes the whole library unusable. @mlipscombe did you end up making a PR? @benwinding what's the fastest way to just disable this altogether? |
Hey Guys, Yes this has been an annoying thing for a while. It's now an option in the options object: const options = {
// Disable the metadata; 'createdate', 'lastupdate', 'createdby', 'updatedby'
disableMeta: true
} Available in @dhstack maybe we should open another issue for renaming the field names. Let me know if there's any issues, Cheers, |
@benwinding Thanks for your quick reply :) This looks great, because we can already add hooks and add our own fields if we want. |
@benwinding This works, thanks! |
is it possible to rename the metadata fields with custom names? |
Hi @mattsears18, const options = {
// Casing for meta fields like 'createdby' and 'updatedby', defaults to 'lower'
// options are: 'lower' | 'camel' | 'snake' | 'pascal' | 'kebab'
metaFieldCasing: 'lower'
}
const dataProvider = FirebaseDataProvider(config, options); |
@benwinding thanks! that will work for now. |
Currently, several metadata fields are automatically created/updated, like
createdate
,lastupdate
,createdby
andupdatedby
. This leaks information (for example, the email addresses of admin users) into documents that may be publicly accessible, and should be able to be disabled.I can make a PR to add an option like
nometadata
if that would be acceptable.The text was updated successfully, but these errors were encountered: