• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Limiting View Access without editing all Controllers

#11
[eluser]BrentNJ[/eluser]
Fresh Powered - Auth Library

Its really easy. But I modified the login function to also put the views permissions in the session variable.

#12
[eluser]dcunited08[/eluser]
Quote:Restricting access to controllers

Use the function below to restrict access to a function.

$this->auth->restrict('user_level');
This works directly with the config file, so you will need to change the $config['auth_groups'] if you have more than the 3 default groups. You should pass the name of the user group to the first parameter, not the user id. The function works in heirachy; for example, if you restrict access to 'users' groups above the user group will also have access to that function. If left blank the function will restrict access to only people who are logged in.

Fresh Documentation

I have never used Fresh Auth but it seems to have the pieces to do the restriction for you, all you need to do is configure it!


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.