This workshop will be retired on January 8, 2022.
Users and Roles13:29 with Chris Ramacciotti
To get up and running with user authentication, we'll need to store usernames and passwords, as well as permissions, into our database. In Spring, we'll store this data into
There is a mistake in the SQL INSERT statements for adding users at the end of this video. We catch this later in the workshop, but in case you want the fix now, it's the
role_id column name that's missing from the two statements. The two INSERT statements should look as follows:
-- Insert a couple users insert into user (username,enabled,password,role_id) values ('user',true,'password',1); insert into user (username,enabled,password,role_id) values ('user2',true,'password',1);
Git Command to Sync Your Code to the Start of this Video
git checkout -f v3
Using Github With This Course
You can complete this course entirely using code created by you on your local machine. However, if you choose to use the code I've made available to you, you have two options:
- Use the project files linked at the bottom of this page, or
- Use the Github repository I've made available (recommended)
If you choose the recommended option of using the Github repository, it can be found at
To utilize Github with this course, you can download the Github desktop client for your system or use the command line interface provided with Git.
Clone this repository to your machine using the Github desktop client, or using the following command:
git clone email@example.com:treehouse/todotoday.git
To update your local repository to match a video's starting point, you can use the
git checkout command in combination with the stage and video number. For example, to update your local repository to match the starting point of Video 4, you'd use the following:
git checkout -f v4
Notice the use of the -f option. This forces Git to override all local changes, so be aware: this will cause any changes you made to be lost.
You need to sign up for Treehouse in order to download course files.Sign up