Permissions

warning: Creating default object from empty value in /home/coredogs/public_html/modules/taxonomy/taxonomy.pages.inc on line 33.

Logging out

Learn:

  • How to add a log out link on the admin menu.
  • The log out page gets rid of the session data.

Checking permissions

Learn:

  • Every admin page checks the log in flag in the session. You can put the code in a separate file, and use the require statement to insert it.
  • Admin pages can check permission data in the session.
  • Use permission data from the session to change the admin interface. Don’t show users actions they’re not allowed to do.

The goal

Learn:

  • There two parts to restricting access to Web applications: authentication and permissions.
  • Authentication is about knowing who the user is.
  • Permissions is about knowing what the user is allowed to do.
  • Create a database table with information about users, including their user names, passwords, and permissions.

Storing user data

Learn:

  • Create a users table in the database. It will have user names, passwords, and permission flags.
  • Good passwords have lowercase letters, uppercase letters, digits, and special characters. They don’t correspond to a dictionary word.

Restricting access

Learn how to restrict what different people can do on a site.


Lessons

How to...


Dogs