aptkingston / budibase-comment-box

A comment box component plugin for Budibase
15 stars 7 forks source link

Method for anonymous users #5

Closed hawkinsjon closed 1 year ago

hawkinsjon commented 1 year ago

Is there any chance or method that I could set the ID for each anonymous user who is commenting? Great plugin, thank you!

aptkingston commented 1 year ago

Hey @hawkinsjon. Supporting anonymous users is probably beyond the scope of this plugin I'm afraid. The plugin depends on a few fields from the $authStore (first name, surname and email), all of which will be empty for public users.

The plugin uses the users email rather than ID since emails are also unchangeable at the moment, and that way we have enough metadata to render the full comment chain without fetching user definitions (which also may not be possible depending on the authentication level of the user reading the comments). It does mean there is the potential for names to get stale though.

Probably the biggest reason this plugin wouldn't work with public users is that it would depending on allowing public write access to whatever table you're storing the comments in, which is extremely dangerous unless you're running a locked down Budibase install on a secure LAN or something.