I'll take a look and see if I can put together anything generic enough to be
useful.  I'd hope that generally, CLI scripts would use models rather than
calling anything in the controller, and generally, the ACL stuff would all
be in the controller.  But that's just the way I do it, I guess having the
auth stuff in the model is a valid way to approach it.

M




swilhelm wrote:
> 
> The issue I have had in the past is when a CLI is trying to leverage an
> admin module that uses the standard Auth / ACL logic. It expects a login
> process to populate some username and password information that get passed
> to the Auth code.  
> 
> It would be nice to see the "best practice" for having an admin module
> provide behavior to both a Web-based UI as well as the CLI scripts.
> 
> - Steve W.
> 
> 
> lightflowmark wrote:
>> 
>> OK, I can certainly look at that.
>> 
>> Generally, you'd set the file permissions on the script so it can only be
>> run by the specified user(s) -  so, for instance:
>> shell# chown admin_user:admin_group myScript.php
>> shell# chmod 744 myScript.php
>> shell # ls -al
>> -rwxr--r-- 1 admin_user admin_group 3212 Apr 17 1999 myScript.php
>> 
>> (can only be executed by the admin_user user)
>> 
>> Is this not possible in your setup for some reason?  I'm not very
>> familiar with shared hosting setups, so is there something that would
>> prevent you doing this?
>> 
>> Thanks for the input,
>> Mark
>> 
>> 
>> 
>> 
>> swilhelm wrote:
>>> 
>>> should optionally require admin credentials passed as arguments or
>>> should confirm CLI is being run by particular system users (e.g. root).
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Best-to-use-CLI-in-my-ZF-1.9-Application-tp25045676p25241061.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to