What is the correct way to enable user submitted content (text, images) for NetlifyCMS + Gatsby setup

Hi Community,

A client has asked me to build a website which has a Testimonials page where user should be able to submit their own testimonials and attach pictures to it.

I am not entirely sure if it is possible to implement something like this using Neltify alone without any third party solutions.

Here is the what I want to achieve. I am just not sure how :

  1. User comes to a website, authenticates with Netlify Identity (Google).
  2. He fills up a form, attaches images and submits.
  3. This opens up a pull request in Github, which the owner of the site should be able to verify and approve using NetlifyCMS workflow.
  4. Once approved in the workflow, it should trigger a build and changes should be live.

Now, my questions regarding this workflow :

  1. Is there a way to restrict user access to NetlifyCMS admin panel? I do not want the other users to be able to access admin panel. Only the owner should have access to admin panel.

  2. Is it possible for user to upload files when using Netlify Large Media or Cloudinary directly from the website without going into Admin panel? If yes, then how? I might be able to use Cloudinary API, but is there such a thing for Netlify Large Media?

  3. How many Google users can I add as a part of the free plan? The jump from $0 to $99/month is very steep and my client will definitely not be on board with this. In docs, it does mention 1000 active users per month. I am unsure what is meant by Active users per month here.

I would appreciate a lot if someone could guide me if this sort of setup is even possible with Gatsby + NetlifyCMS + Netlify Large Media or Cloudinary.

Thanks,
Sangeet

Hi @sangeet,

Sorry, I don’t have a great answer for you, but there isn’t a good way to do what you are doing. The Netlify CMS is git based. If you want users to be able to submit content via a form on your site, this isn’t using the Netlify CMS for the submission, which means you’d have to create all of that yourself and have it create the appropriate pull request in github using their API, probably through a lambda function or something similar. This is a signifiant amount of work. But if you create the appropriate PR the same way the CMS creates them, then the editorial workflow in the netlify cms will pick them up so you can approve them.

You can restrict access to the CMS by only giving people logins that you want to have access to the CMS. You can limit the CMS to specific JWT roles.

You can’t upload to Netlify Large Media from anywhere other than a regular git client since it uses git-lfs. For Cloudinary, you have options available but we don’t have guides for using Cloudinary or their JS client, only for usingCloudinary from within the Netlify CMS.

The pricing for Identity is available on https://www.netlify.com/pricing/#identity . Whether you are using Google auth or not doesn’t change how the number of users affects pricing.

What you are looking for is fairly custom so there won’t be any guides or really any examples. You’d have to write a lot of custom code which would mean familiarizing yourself with the Netlify CMS. Also note that what I wrote here probably isn’t the only way to accomplish this, it’s just what popped into my head when I read your question.