The user backend logic needs to change a little to fit our needs. For example, we need roles for our users. We will detail this when we talk about the user model. We must add authorization policies. We also need a profile for our users.
We need to make a few changes to the user model in order to support multiple account types and eventually assign roles to users. This will tell us whether the user is registered for a simple account, where they can define a profile with work experience, or to create a company that wants to post job opportunities.
The roles are going to define what actions the user can perform. For example, for a company we can have a company owner that has full control over the account, or we can have a user that is a member of that company and posts available job openings.
Let's modify the user schema from jobboard/app/models/user.js
with the following:
var UserSchema = new Schema({ email: { type: String, required...