Learn
Authorization
Authorization

So far we’ve seen how to build an authentication system that lets users sign up, log in, and log out.

In addition to authentication, many web apps have a way to give specific users permission to access certain parts of the site. For example, a blog would give only its authors permission to access the editing and publishing parts of the site. Permissions are defined with an authorization system.

Let’s create an authorization system for a recipe website built with Rails.

Instructions

1.

We’ve provided a Rails app to get you started. Let’s take a look - first install the gems in the Gemfile.

2.

Next start a Rails development server.

3.

Then preview the app by visiting http://localhost:8000.

4.

Click on “View Recipes” to see recipes inside a cuisine.

How can we add an authorization system to this app? Click Next to learn more.

Folder Icon

Sign up to start coding

Already have an account?