authentication

Disabled Accounts

Sometimes you need to disable a users account, without deleting the account and the information related to that account. That's why previously in Controller and Views there was a user role named "Disabled." You can set the role to Disabled currently, but it doesn't do anything. Now we're going to change that.

Elements

Elements are reusable blocks of code you can create once and use in multiple Views of your site, making it easier to make changes in a single location instead of searching for all the occurrences of the same code.

For ease of access I create a common login/logout block to display on all the pages of my applications.

Authorization

Currently any logged in user can add new users and edit existing users. We want to add more finely detailed restrictions. For example we want to restrict non-Admins from editing any user but themselves, nor adding any new accounts. Also we want to restrict non-Admins from changing their role from User to Admin.

Database and Model

Now that your application is up and running, it is time to build your data store and interface with that data. We have two options here: We can create the database tables using Migrations or directly in the database, either through the database interface, a web interface, or an IDE interface.