Re: CakePdf - How To Start?

2012-09-05 Thread bigjimmi
Did anyone have any look here - trying to attached a PDF to a email but 
failing - do you have to actually create the file on the server or can you 
do something like the readme suggests ($pdf = $CakePdf->output();)??

On Tuesday, 4 September 2012 12:04:48 UTC+1, thosfelt wrote:
>
> I've only had luck downloading, tried setting download to false and giving 
> it a path and filename, but that only displayed the file in the browser.
>
> On Sunday, September 2, 2012 4:52:21 PM UTC-4, elogic wrote:
>>
>> I'm not sure, I would expect it can be done however depending on the 
>> engine you are using, maybe ask directly on the github site.
>>
>> Did you manage to work out how to connect the pdf's into an email by any 
>> chance? I am struggling to work this out, I can only get the PDF to 
>> download at the moment.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: ACL - how to set user permissions along with group permission

2012-07-27 Thread bigjimmi
Hi, thanks for the reply. Basically I'm wanting to add access control 
permissions to individual db rows? but I guess that would be the same as 
allow access to /modelname/view/1? Struggling to find any info on this.

Thanks in advance

On Friday, 27 July 2012 12:21:01 UTC+1, bigjimmi wrote:
>
> Hi, I've followed the cake acl tutorials and have a working example. 
> However the tutorial is purely based around groups (it tells you to add 
> some code that disregards users and just looks at group permissions). How 
> can I keep the groups working but also override things for individual users?
>
> Thanks in advance
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


ACL - how to set user permissions along with group permission

2012-07-27 Thread bigjimmi
Hi, I've followed the cake acl tutorials and have a working example. 
However the tutorial is purely based around groups (it tells you to add 
some code that disregards users and just looks at group permissions). How 
can I keep the groups working but also override things for individual users?

Thanks in advance

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: How can I get the ID of a Post as its saved for the first time?

2012-07-27 Thread bigjimmi
Thanks for the helkp guys - this worked a treat 
: $this->Post->getInsertID();

On Friday, 27 July 2012 10:43:52 UTC+1, bigjimmi wrote:
>
> Is it possible within a Add() function to find the ID of a post just as 
> its written to the DB?
>
> Basically I'm trying to create a ACO for the post when its saved by doing 
> something like this:
>
> $aco = $this->Acl->Aco->create(Array('model'=>Post, foreign_key=>''));
>
> Where  is the ID of the post that's just been saved within the same 
> function.
>
> Thanks in advance
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


How can I get the ID of a Post as its saved for the first time?

2012-07-27 Thread bigjimmi
Is it possible within a Add() function to find the ID of a post just as its 
written to the DB?

Basically I'm trying to create a ACO for the post when its saved by doing 
something like this:

$aco = $this->Acl->Aco->create(Array('model'=>Post, foreign_key=>''));

Where  is the ID of the post that's just been saved within the same 
function.

Thanks in advance

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Best way to restrict access to certain DB records for certain user groups.

2012-07-26 Thread bigjimmi
Thanks for that I'll take a look. The way I understand it is that when an 
admin adds a new manual I have to create it as a aco, then when I add a 
user I create a ARO then assign permissions. Its just how I do that I need 
to learn.

Thanks again

On Thursday, 26 July 2012 15:18:57 UTC+1, Ratty wrote:
>
>  On 26/07/12 14:56, bigjimmi wrote:
>  
> Hi. Within my cake app admins are able to add records (users manuals). I 
> want to give only certain users access to certain manuals. I'm using the 
> ACL and Auth component to handle logins and access to CRUD functions. 
>
>  How can I control access to these certain records? When an admin creates 
> a user, I want them to tick check boxes relating to what manuals a user can 
> access and of course be able to go back and change this.
>
>  Does anyone have any idea how I can accomplish this or have 
> come across any tutorials with similar functionality?
>
>  Thanks in advance
> -- 
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org 
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
>  
>  
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> at http://groups.google.com/group/cake-php
>
>
> Have a read of Mark Story's excellent ACL/Auth tutorial on his blog : 
> http://mark-story.com/posts/view/auth-and-acl-an-end-to-end-tutorial-pt-1
>
> I suspect you'll have to write the check box functionality yourself as it 
> is specific to your application and your database but this should at least 
> give you the knowledge as to how to go about doing it. Mark also has a very 
> nice menu component that you could use after permissions have been assigned 
> to allow access to your manuals...  
> http://mark-story.com/posts/view/acl-menu-component
>
>
>
>
>  

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Best way to restrict access to certain DB records for certain user groups.

2012-07-26 Thread bigjimmi
Thanks for that I'll take a look. The way I understand it is that when an 
admin adds a new manual I have to create it as a aco, then when I add a 
user I create a ARO then assign permissions. Its just how I do that I need 
to learn.

Thanks again

On Thursday, 26 July 2012 14:56:08 UTC+1, bigjimmi wrote:
>
> Hi. Within my cake app admins are able to add records (users manuals). I 
> want to give only certain users access to certain manuals. I'm using the 
> ACL and Auth component to handle logins and access to CRUD functions.
>
> How can I control access to these certain records? When an admin creates a 
> user, I want them to tick check boxes relating to what manuals a user can 
> access and of course be able to go back and change this.
>
> Does anyone have any idea how I can accomplish this or have 
> come across any tutorials with similar functionality?
>
> Thanks in advance
>

On Thursday, 26 July 2012 14:56:08 UTC+1, bigjimmi wrote:
>
> Hi. Within my cake app admins are able to add records (users manuals). I 
> want to give only certain users access to certain manuals. I'm using the 
> ACL and Auth component to handle logins and access to CRUD functions.
>
> How can I control access to these certain records? When an admin creates a 
> user, I want them to tick check boxes relating to what manuals a user can 
> access and of course be able to go back and change this.
>
> Does anyone have any idea how I can accomplish this or have 
> come across any tutorials with similar functionality?
>
> Thanks in advance
>

On Thursday, 26 July 2012 14:56:08 UTC+1, bigjimmi wrote:
>
> Hi. Within my cake app admins are able to add records (users manuals). I 
> want to give only certain users access to certain manuals. I'm using the 
> ACL and Auth component to handle logins and access to CRUD functions.
>
> How can I control access to these certain records? When an admin creates a 
> user, I want them to tick check boxes relating to what manuals a user can 
> access and of course be able to go back and change this.
>
> Does anyone have any idea how I can accomplish this or have 
> come across any tutorials with similar functionality?
>
> Thanks in advance
>

On Thursday, 26 July 2012 14:56:08 UTC+1, bigjimmi wrote:
>
> Hi. Within my cake app admins are able to add records (users manuals). I 
> want to give only certain users access to certain manuals. I'm using the 
> ACL and Auth component to handle logins and access to CRUD functions.
>
> How can I control access to these certain records? When an admin creates a 
> user, I want them to tick check boxes relating to what manuals a user can 
> access and of course be able to go back and change this.
>
> Does anyone have any idea how I can accomplish this or have 
> come across any tutorials with similar functionality?
>
> Thanks in advance
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Best way to restrict access to certain DB records for certain user groups.

2012-07-26 Thread bigjimmi
Hi. Within my cake app admins are able to add records (users manuals). I 
want to give only certain users access to certain manuals. I'm using the 
ACL and Auth component to handle logins and access to CRUD functions.

How can I control access to these certain records? When an admin creates a 
user, I want them to tick check boxes relating to what manuals a user can 
access and of course be able to go back and change this.

Does anyone have any idea how I can accomplish this or have come across any 
tutorials with similar functionality?

Thanks in advance

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Beginners question - where can I find what I can pass to certain properties?

2012-07-26 Thread bigjimmi
Ah, my mistake! Awesome I've been looking everywhere. As I wasn't in 
routes.php I never thought to look up routing.

Thank you so much for your help.

On Thursday, 26 July 2012 09:33:58 UTC+1, bigjimmi wrote:
>
> Hi Guys 
>
> First post, apologies its pretty basic!
>
> I'm struggling with the cakephp docs, where can I find exactly what I can 
> pass to certain properties? 
>
> For example, it to me AGES to discover I could pass 'admin' => TRUE to
>
> $this->Auth->loginAction = array('controller' => 'users', 'action' => 
> 'login', 'admin' => TRUE);
>
> Which caused me loads of problems.
>
> Where can I find out what else I can pass? I've looked at the API and it 
> just says array(), but WHAT can the array consist of?
>
> Thanks in advance for your time.
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Assigning individual user permission with ACL

2012-07-26 Thread bigjimmi
Hi, I've been following the ACL tutorials on the cake site and have a 
question (am reading through the cake docs too but I dont 100% follow what 
they mean).

>From the tutorial I have this - 

public function beforeFilter() {
parent::beforeFilter();
//$this->Auth->allow('initDB'); // We can remove this line after we're 
finished
}

public function initDB() {
$group = $this->User->Group;
//Allow admins to everything
$group->id = 1;
$this->Acl->allow($group, 'controllers');

//allow managers to posts and widgets
$group->id = 2;
$this->Acl->deny($group, 'controllers');
$this->Acl->allow($group, 'controllers/Posts');
$this->Acl->allow($group, 'controllers/Widgets');

//allow users to only add and edit on posts and widgets
$group->id = 3;
$this->Acl->deny($group, 'controllers');
$this->Acl->allow($group, 'controllers/Posts/add');
$this->Acl->allow($group, 'controllers/Posts/edit');
$this->Acl->allow($group, 'controllers/Widgets/add');
$this->Acl->allow($group, 'controllers/Widgets/edit');
//we add an exit to avoid an ugly "missing views" error message
echo "all done";
exit;
}

How could I allow a certain user (Bob) in say group 3 access to 
controllers/Posts/delete would it just be something like:

$this->Acl->allow('3/Bob', 'controllers/Posts/delete');

???

Thanks in advance. 

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Beginners question - where can I find what I can pass to certain properties?

2012-07-26 Thread bigjimmi
Thanks for the reply. I've already done that and *NOWHERE *does it say you 
can pass 'Admin' => TRUE. If I hadn't stumbled across a random tutorial 
with the same issues I wouldn't have been able to progress in building my 
app.

Is there some set of global array flags you can pass to certain properties?

On Thursday, 26 July 2012 10:13:14 UTC+1, Dr. Tarique Sani wrote:
>
> My recommendation is pretty basic too 
>
> http://book.cakephp.org/2.0/en/index.html <- start here and continue 
> till the appendices only then take a look at the API 
>
> :-) 
>
> HTH 
> Tarique 
>
>
> On Thu, Jul 26, 2012 at 2:03 PM, bigjimmi 
>  wrote: 
> > Hi Guys 
> > 
> > First post, apologies its pretty basic! 
> > 
> > I'm struggling with the cakephp docs, where can I find exactly what I 
> can 
> > pass to certain properties? 
> > 
> > For example, it to me AGES to discover I could pass 'admin' => TRUE to 
> > 
> > $this->Auth->loginAction = array('controller' => 'users', 'action' => 
> > 'login', 'admin' => TRUE); 
> > 
> > Which caused me loads of problems. 
> > 
> > Where can I find out what else I can pass? I've looked at the API and it 
> > just says array(), but WHAT can the array consist of? 
> > 
> > Thanks in advance for your time. 
> > 
> > -- 
> > Our newest site for the community: CakePHP Video Tutorials 
> > http://tv.cakephp.org 
> > Check out the new CakePHP Questions site http://ask.cakephp.org and 
> help 
> > others with their CakePHP related questions. 
> > 
> > 
> > To unsubscribe from this group, send email to 
> > cake-php+unsubscr...@googlegroups.com For more options, visit this 
> group at 
> > http://groups.google.com/group/cake-php 
>
>
>
> -- 
> = 
> PHP for E-Biz: http://sanisoft.com 
> = 
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Beginners question - where can I find what I can pass to certain properties?

2012-07-26 Thread bigjimmi
Hi Guys 

First post, apologies its pretty basic!

I'm struggling with the cakephp docs, where can I find exactly what I can 
pass to certain properties? 

For example, it to me AGES to discover I could pass 'admin' => TRUE to

$this->Auth->loginAction = array('controller' => 'users', 'action' => 
'login', 'admin' => TRUE);

Which caused me loads of problems.

Where can I find out what else I can pass? I've looked at the API and it 
just says array(), but WHAT can the array consist of?

Thanks in advance for your time.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Permission erros when following ACL 2.0 tutorials

2011-11-15 Thread bigjimmi
Hi all,

I'm being plagued with permission errors when trying to follow the ACL
2.0 tutorial.

I've made my tmp directory and all contents NOT read only.

Warning (512): SplFileInfo::openFile(C:\wamp\www\CakeAclTest\app\tmp
\cache\models\cake_model_default_aros_acos) [splfileinfo.openfile]:
failed to open stream: Permission denied [CORE\Cake\Cache\Engine
\FileEngine.php, line 293]

Please help. Thanks in advance.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php