Is this secure? Concept for private info in replies

@mpalmer That works, but really slows down the process. It isn’t very scalable. For example, with inline private data the user can attach a private URL before the topic even gets a response. The next person able to work on the ticket may not have been the one requesting the login credentials. If the ticket needs escalation to another user they’d have to coordinate to get that information (more potential exposure) or annoyingly request the user to PM someone else. And if the user needs to change any of the information along the way, they need to resend it to any of the involved parties. For me it is definitely worth a custom plugin if I can get private data per post accessible by the OP and staff.

The plugin in the gist above gets custom field content into the post stream, and only when the user should be able to see it.

It also accepts a PUT to /secure-note/update allowing permissible users to set the note content. It seems to be working minus the UI. Being new to Rails and Discourse plugin development, I’m just concerned about that custom field somehow being exposed to users who shouldn’t see it somehow.

Is it ok to store sensitive info in custom fields?