April 10, 2012

What resources mean in ACL in zend framework

Question by PalAla

I want to know what is resouces in ACL, is it module, controller in a module or action in controller in module.

In the documentation, resoiurces (newsletter, news,latest) and others are not clear what they are.

Also in this example the resources are not clear!!!

[mainMenu]
login          = Everyone
applications   = Everyone
preferences    = User
administration = Implementor

[userPreferences]
details = User
params  = User
themes  = User

Answer by Jani Hartikainen

Resource is simply something you want to limit access to. It could be a page, a record in your DB or whatever your application needs.

I wrote a three-part series on Zend_Acl, in which I talk about what resources are amongst other things: http://codeutopia.net/blog/2009/02/06/zend_acl-part-1-misconceptions-and-simple-acls/

Answer by Starx

For example

new Zend_Acl_Resource('someResource')

Denotes that someResource points to an PHP module/section, which is suppose to be accessible but, it has be controlled so that only authorized roles can access it.

Author: Nabin Nepal (Starx)

Hello, I am Nabin Nepal and you can call me Starx. This is my blog where write about my life and my involvements. I am a Software Developer, A Cyclist and a Realist. I hope you will find my blog interesting. Follow me on Google+

...

Please fill the form - I will response as fast as I can!