Loading Please wait...

Controller Access Specifiers

Assume you have a sencitive method on your Controller Class that you don want to permit access through URL. or even if you permit it will require a valid user name or password. for this situation Controller access priviledges are tuned by some Access Map(s).
go to your project's etc/conf.d/access Directory. There You will already find a file clled global.access.map.php. All access Maps reside there.

You can create access Maps for a Controller. which maps sensitive methods of a Controller.to create an access map of a controller first you need to create a file called controllerName.access.map.phpin It write Blocks for that method. e.g. assuming you have a method called edit() that you want to protect. (assuming your controller name is marksheet e.g. the Class name is marksheetController).

Private Access

so first create a file named marksheet.access.map.php in that directory in which write the following.
  access: private
now the edit() method will not be accessible throu url. and if tried to access zigmoyd will fire some Error.

Protected Access

The bellow example validates user by given User name and password in plain text.
  access: protected
  mode: plain
  usr: foo
  psw: bar
Valid username(foo) and password(bar) will be required to access the edit method.

Protected Access with Database

What If the UserName and password comes from database.
  access: protected
  mode: db
  usr: user
  psw: pasword
  con: schoolConn
  table: admin
You need to pass the Connection file that will be used to connect with the database and the table Name that holds the user Name and password. Here user name is stored into user Column and Passwords are stored into password Column.

Global Access Map

If you write some map for a Method Block on global.access.map.php that will effect all controllers of the Current Project

Generated on Mon Oct 27 23:51:57 2008 for zigmoyd.kdevelop by doxygen 1.5.6