Welcome Guest, Not a member yet? Register   Sign In
Limiting View Access without editing all Controllers
#6

[eluser]dcunited08[/eluser]
[quote author="Rick Jolly" date="1228434688"][quote author="dcunited08" date="1228429568"]Overload the Loader class (create MY_Loader)...
[/quote]
Please don't.

In the name of transparency and consistency, put all application logic that must process on every request in the constructor of a parent controller.

How would any future programmer know why a view wasn't loading? Why sprinkle bits of application specific logic throughout CI system files?[/quote]

I thought the MY_Loader would be in the Application/libraries folder. How would the constructor know what view is being called? Honestly, the best bet would be to limit access to controllers not to views because by the time it is going to the views it is too late to worry about rights to data or to really handle a failure of rights well (send them to login, show a different view, etc..)


Messages In This Thread
Limiting View Access without editing all Controllers - by El Forum - 12-04-2008, 09:30 AM
Limiting View Access without editing all Controllers - by El Forum - 12-04-2008, 09:49 AM
Limiting View Access without editing all Controllers - by El Forum - 12-04-2008, 10:26 AM
Limiting View Access without editing all Controllers - by El Forum - 12-04-2008, 11:23 AM
Limiting View Access without editing all Controllers - by El Forum - 12-04-2008, 11:51 AM
Limiting View Access without editing all Controllers - by El Forum - 12-04-2008, 12:05 PM
Limiting View Access without editing all Controllers - by El Forum - 12-04-2008, 12:25 PM
Limiting View Access without editing all Controllers - by El Forum - 12-04-2008, 12:37 PM
Limiting View Access without editing all Controllers - by El Forum - 12-04-2008, 12:58 PM
Limiting View Access without editing all Controllers - by El Forum - 12-04-2008, 01:33 PM
Limiting View Access without editing all Controllers - by El Forum - 12-04-2008, 02:18 PM
Limiting View Access without editing all Controllers - by El Forum - 12-04-2008, 02:54 PM



Theme © iAndrew 2016 - Forum software by © MyBB