Category Archive for: Authorization and Sessions

Group-Specific Menus

Right now, you can use authorize_user to check a user against a list of groups and either reject access to a page or allow the user to see a page. That means you have the logic to handle group-specific menus, but the actual implementation might take a bit of refactoring. Take a look at your menu system as…

Read More →

Iterating Over Each Group

Take a step back to the case in which you c: get a list of groups as  should loop over each group and for each group, build a SQL query. Start out by just looping over the $groups array. You can use a for loop, but in this case there’s a better choice: for each. for each lets…

Read More →

Checking for Group Membership

By replacing basic authentication with your own authentication scheme you have the makings of good solid authentication. Authentication simply lets users into your application when they log in. They authenticate in some manner that confirms to your system that they are who they say they are. But now, it’s time to add the ability to give access only…

Read More →

Authorization and Sessions

It’s time to add some refinement to the authentication and navigation systems you built in the last couple of chapters. You’ve created an attractive login screen as well as added authentication to let users into and out of your application. It’s time to go further needs to be improved. It should take in a group (or better a list…

Read More →

Back to Top