Granting Scrivito Users Access

Granting Scrivito Users Access

The content maintained with Scrivito should only be editable by users logged in as a Solidus admin. To achieve this, first create the file app/models/solidus_scrivito_user.rb and set its contents to:

Now add the following to config/initializers/scrivito.rb inside the Scrivito.configure block:

Restart your application using bundle exec rails s, then visit localhost:3000/login and log in with your admin credentials (e.g. admin@example.com/test123).

You should now be able to edit content again. Once logged out (by visiting localhost:3000/logout) you will no longer be able to edit the content.