Re: Bakery article publishing delay

2009-08-14 Thread JamesF

thanks I didn't know that they did that much editing/testing.

On Aug 14, 3:31 pm, Miles J  wrote:
> Well how many of those articles/code submissions do you think they
> have to go through? They must proofread them all and test any code
> that is given, and they will comment on it if it needs improvement.
> Some of mine took weeks till it was reviewed, so just be patient and
> they will get to it.
--~--~-~--~~~---~--~~
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
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Bakery article publishing delay

2009-08-14 Thread Miles J

Well how many of those articles/code submissions do you think they
have to go through? They must proofread them all and test any code
that is given, and they will comment on it if it needs improvement.
Some of mine took weeks till it was reviewed, so just be patient and
they will get to it.
--~--~-~--~~~---~--~~
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
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Bakery article publishing delay

2009-08-14 Thread JamesF

i recently published an article to the bakery, but it has been a few
days now and I'm wondering if this is typical for new articles. Anyone
have any experience with this?
--~--~-~--~~~---~--~~
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
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Bakery Article Comment Notification broken

2009-01-15 Thread grigri

I noticed this too; In thunderbird the email content is blank. You
have to "view source" to actually see the content.

On Jan 15, 9:43 am, "dr. Hannibal Lecter"  wrote:
> I have reported this a while ago:
>
> https://trac.cakephp.org/ticket/5001
>
> Still having the same problem.
>
> On Jan 15, 8:32 am, majna  wrote:
>
> > I cant open mail notification in gmail.
> > content type is multipart/alternative,
> > message is attached as unknown file.
--~--~-~--~~~---~--~~
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
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Bakery Article Comment Notification broken

2009-01-15 Thread dr. Hannibal Lecter

I have reported this a while ago:

https://trac.cakephp.org/ticket/5001

Still having the same problem.

On Jan 15, 8:32 am, majna  wrote:
> I cant open mail notification in gmail.
> content type is multipart/alternative,
> message is attached as unknown file.
--~--~-~--~~~---~--~~
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
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Bakery Article Comment Notification broken

2009-01-14 Thread majna

I cant open mail notification in gmail.
content type is multipart/alternative,
message is attached as unknown file.
--~--~-~--~~~---~--~~
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
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: text missing from bakery article

2008-04-16 Thread Sliv

oh, now that I logged in I can get to them and see what you mean...

(adds more bugs to the to-do list)

On Apr 16, 5:26 pm, Sliv <[EMAIL PROTECTED]> wrote:
> I'm not sure - when I click on both of your links I get an "article
> not found" ...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: text missing from bakery article

2008-04-16 Thread Sliv

I'm not sure - when I click on both of your links I get an "article
not found" ...

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: text missing from bakery article

2008-04-16 Thread margin

I'm seeing the same thing :

http://bakery.cakephp.org/articles/view/captcha-component-with-phpcaptcha

On Apr 16, 3:16 pm, michaelmcandrew <[EMAIL PROTECTED]> wrote:
> anyone know why the text of this article isn't 
> showing?http://bakery.cakephp.org/articles/view/setting-up-eclipse-to-work-wi...
> (declaring an interest: i wrote it ;-)

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



text missing from bakery article

2008-04-16 Thread michaelmcandrew

anyone know why the text of this article isn't showing?
http://bakery.cakephp.org/articles/view/setting-up-eclipse-to-work-with-cake
(declaring an interest: i wrote it ;-)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Bakery Article Submission - Broken?

2008-03-04 Thread Samuel DeVore

open a ticket on trac.cakephp.org

On Tue, Mar 4, 2008 at 12:04 PM, Doug @ Straw Dogs
<[EMAIL PROTECTED]> wrote:
>
>  I'm trying to submit an article/component in the Bakery but its
>  returning a blank screen on submission.  I'd give more information but
>  thats as much as there is.  Nothing.
>
>  Any ideas?
>  >
>



-- 
-- 
(the old fart) the advice is free, the lack of crankiness will cost you

- its a fine line between a real question and an idiot

http://blog.samdevore.com/archives/2007/03/05/when-open-source-bugs-me/
http://blog.samdevore.com/cakephp-pages/my-cake-wont-bake/
http://blog.samdevore.com/cakephp-pages/i-cant-bake/

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



RE: Bakery Article Submission - Broken?

2008-03-04 Thread Christian Winther

Drop a ticket on trac. Their servers have had quite a few problems today

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Doug @ 
Straw Dogs
Sent: 4. marts 2008 20:04
To: Cake PHP
Subject: Bakery Article Submission - Broken?


I'm trying to submit an article/component in the Bakery but its
returning a blank screen on submission.  I'd give more information but
thats as much as there is.  Nothing.

Any ideas?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Bakery Article Submission - Broken?

2008-03-04 Thread Doug @ Straw Dogs

I'm trying to submit an article/component in the Bakery but its
returning a blank screen on submission.  I'd give more information but
thats as much as there is.  Nothing.

Any ideas?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



RE: bakery article publishing - how long does one need to wait?

2008-02-18 Thread Mariano Iglesias

Hannibal: it's been published. It was modified on Feb 14, so 4 days ain't
the end of the world.

-MI

---

Remember, smart coders answer ten questions for every question they ask. 
So be smart, be cool, and share your knowledge. 

BAKE ON!

blog: http://www.MarianoIglesias.com.ar


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: bakery article publishing - how long does one need to wait?

2008-02-18 Thread rtconner

Usually it's Mariano, he's approved most of my articles. Though, I
think gwoo approved one of them.


On Feb 18, 10:21 am, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
> On Feb 18, 2008 12:17 PM, dr. Hannibal Lecter <[EMAIL PROTECTED]> wrote:
>
>
>
> > As far as I can understand it, comments can be moderated, so that
> > might be the root of your problem. I don't see the cause of article
> > publishing delay though, very strange.. :-/
>
> Every submission to the bakery needs to be approved by "somebody",
> although I do not know who that somebody  is.  When on of these
> "somebodies" sees the submission, they will either approve it or
> reject it.  Shocking as this is, but some people are spending time on
> things other than monitoring submissions to the bakery even when they
> have the ability to approve them.
>
> --
> Chris Hartjes
> Internet Loudmouth
> Motto for 2008: "Moving from herding elephants to handling snakes..."
> @TheKeyBoard:http://www.littlehart.net/atthekeyboard
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: bakery article publishing - how long does one need to wait?

2008-02-18 Thread Samuel DeVore

is it possible that there was an email sent to you from the maintainer
about some suggested changes/ edits that might of gotten eaten by a
spam filter?  This happened to me once

Sam D

On Feb 18, 2008 10:52 AM, dr. Hannibal Lecter <[EMAIL PROTECTED]> wrote:
>
> Thanks Chris,
>
> I am aware of the fact that articles need to be approved for
> publishing, but I've seen 3 other articles go up since my submission
> (AFAIR, before the CakeFest). I'm not being cynical here or anything,
> just wondering how long the period is actually. 2 weeks? 3 weeks? 4
> years? :-)
>
> Thanks again,
> H.
>
> On Feb 18, 6:21 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
>
> > On Feb 18, 2008 12:17 PM, dr. Hannibal Lecter <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> > > As far as I can understand it, comments can be moderated, so that
> > > might be the root of your problem. I don't see the cause of article
> > > publishing delay though, very strange.. :-/
> >
> > Every submission to the bakery needs to be approved by "somebody",
> > although I do not know who that somebody  is.  When on of these
> > "somebodies" sees the submission, they will either approve it or
> > reject it.  Shocking as this is, but some people are spending time on
> > things other than monitoring submissions to the bakery even when they
> > have the ability to approve them.
> >
> > --
> > Chris Hartjes
> > Internet Loudmouth
> > Motto for 2008: "Moving from herding elephants to handling snakes..."
> > @TheKeyBoard:http://www.littlehart.net/atthekeyboard
> >
>



-- 
-- 
(the old fart) the advice is free, the lack of crankiness will cost you

- its a fine line between a real question and an idiot

http://blog.samdevore.com/archives/2007/03/05/when-open-source-bugs-me/
http://blog.samdevore.com/cakephp-pages/my-cake-wont-bake/
http://blog.samdevore.com/cakephp-pages/i-cant-bake/

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: bakery article publishing - how long does one need to wait?

2008-02-18 Thread dr. Hannibal Lecter

Thanks Chris,

I am aware of the fact that articles need to be approved for
publishing, but I've seen 3 other articles go up since my submission
(AFAIR, before the CakeFest). I'm not being cynical here or anything,
just wondering how long the period is actually. 2 weeks? 3 weeks? 4
years? :-)

Thanks again,
H.

On Feb 18, 6:21 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
> On Feb 18, 2008 12:17 PM, dr. Hannibal Lecter <[EMAIL PROTECTED]> wrote:
>
>
>
> > As far as I can understand it, comments can be moderated, so that
> > might be the root of your problem. I don't see the cause of article
> > publishing delay though, very strange.. :-/
>
> Every submission to the bakery needs to be approved by "somebody",
> although I do not know who that somebody  is.  When on of these
> "somebodies" sees the submission, they will either approve it or
> reject it.  Shocking as this is, but some people are spending time on
> things other than monitoring submissions to the bakery even when they
> have the ability to approve them.
>
> --
> Chris Hartjes
> Internet Loudmouth
> Motto for 2008: "Moving from herding elephants to handling snakes..."
> @TheKeyBoard:http://www.littlehart.net/atthekeyboard
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: bakery article publishing - how long does one need to wait?

2008-02-18 Thread Chris Hartjes

On Feb 18, 2008 12:17 PM, dr. Hannibal Lecter <[EMAIL PROTECTED]> wrote:
>
> As far as I can understand it, comments can be moderated, so that
> might be the root of your problem. I don't see the cause of article
> publishing delay though, very strange.. :-/
>

Every submission to the bakery needs to be approved by "somebody",
although I do not know who that somebody  is.  When on of these
"somebodies" sees the submission, they will either approve it or
reject it.  Shocking as this is, but some people are spending time on
things other than monitoring submissions to the bakery even when they
have the ability to approve them.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: "Moving from herding elephants to handling snakes..."
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: bakery article publishing - how long does one need to wait?

2008-02-18 Thread dr. Hannibal Lecter

As far as I can understand it, comments can be moderated, so that
might be the root of your problem. I don't see the cause of article
publishing delay though, very strange.. :-/

On Feb 18, 4:57 pm, leo <[EMAIL PROTECTED]> wrote:
> I have had the same problem with two comments on articles.
> L.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: bakery article publishing - how long does one need to wait?

2008-02-18 Thread leo

I have had the same problem with two comments on articles.
L.

On 18 Feb, 13:03, "dr. Hannibal Lecter" <[EMAIL PROTECTED]> wrote:
> Heh..anyone?
>
> On Feb 15, 11:33 am, "dr. Hannibal Lecter" <[EMAIL PROTECTED]>
> wrote:
>
> > Hi all,
>
> > I've posted an article about Markdown and dp.SyntaxHighligher to the
> > bakery; it's been a while and the article is still not published. I
> > was just wondering is this a standard issue or do I need to correct
> > something in the article itself? (I apologize if this is the wrong
> > place to post, don't know any better..)
>
> > Thanks,
> > H.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: bakery article publishing - how long does one need to wait?

2008-02-18 Thread JakeCake

For me almost nothing works in the Bakery! I get a blank page when
saving the article. But also when searching. Is it my Firefox?!! As I
heard everywhere, you should post something in the trac...

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: bakery article publishing - how long does one need to wait?

2008-02-18 Thread dr. Hannibal Lecter

Heh..anyone?

On Feb 15, 11:33 am, "dr. Hannibal Lecter" <[EMAIL PROTECTED]>
wrote:
> Hi all,
>
> I've posted an article about Markdown and dp.SyntaxHighligher to the
> bakery; it's been a while and the article is still not published. I
> was just wondering is this a standard issue or do I need to correct
> something in the article itself? (I apologize if this is the wrong
> place to post, don't know any better..)
>
> Thanks,
> H.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



fixed: re. bakery article 'p28n, the top to bottom persistent internationalization tutorial.'

2008-02-15 Thread leo

Woops, I found a space after a ?> ... got to watch out for those
blighters.

On 15 Feb, 13:37, leo <[EMAIL PROTECTED]> wrote:
> I've been trying to implement this in 1.2, but I always get a headers
> already sent error. Has anyone had any success with it? Does anyone
> know the answer to my problem?
>
> I've already spent the morning picking it to pieces and now I have to
> move on to something else.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



re. bakery article 'p28n, the top to bottom persistent internationalization tutorial.'

2008-02-15 Thread leo

I've been trying to implement this in 1.2, but I always get a headers
already sent error. Has anyone had any success with it? Does anyone
know the answer to my problem?

I've already spent the morning picking it to pieces and now I have to
move on to something else.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



bakery article publishing - how long does one need to wait?

2008-02-15 Thread dr. Hannibal Lecter

Hi all,

I've posted an article about Markdown and dp.SyntaxHighligher to the
bakery; it's been a while and the article is still not published. I
was just wondering is this a standard issue or do I need to correct
something in the article itself? (I apologize if this is the wrong
place to post, don't know any better..)

Thanks,
H.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Bakery article on "Testing Models" -- Missing Database Table

2007-12-20 Thread daphonz

Hello,

I've been having a very similar problem in 1.2.5875.  I followed the
above tips, using them to modify the instructions in the Bakery
article.  It looks like the fixture tables are being created, but that
I am unable to access any data from them.  For example:

My user_test_fixture.php:

class UserTestFixture extends CakeTestFixture {
var $name = 'UserTest';
var $import = array('table' => 'users');
var $records = array(
array ('id' => 1, 'group_id' => '1', 'username' => 'admin',
'passwd' => '21232f297a57a5a743894a0e4a801fc3', 'name' => 'Admin
User', 'email'=>'[EMAIL PROTECTED]','last_visit'=>'2007-03-18
10:41:31', 'active'=>'1', 'created'=>'2007-01-18
10:41:31','created_by_user_id'=>'1','modified' => '2007-03-18
10:41:31','modified_by_user_id'=>'1'),
array ('id' => 2, 'group_id' => '2', 'username' => 'testuser',
'password' => '5d9c68c6c50ed3d02a2fcf54f63993b6', 'name' => 'Test
User', 'email'=>'[EMAIL PROTECTED]','last_visit'=>'2007-03-18
10:41:31', 'active'=>'1', 'created'=>'2007-01-18
10:41:31','created_by_user_id'=>'1','modified' => '2007-03-18
10:41:31','modified_by_user_id'=>'1')
);
}

Here is my user.test.php:

UserTest =& new UserTest();
}

function endTest($method) {
unset($this->UserTest);
}


function testCheckUserExistence() {

/* Existing Username */
/* The command pr($this->UserTest->find('count'));
retuns 0 here */

$result = $this->UserTest->checkUserExistence('admin');
$this->assertTrue($result,'User, admin, should be found');
}
}
?>

So, yes, the test method reports a failure.  Can anyone offer some
help or suggestions?  It would be greatly, greatly appreciated.






On Dec 20, 11:06 am, "Mariano Iglesias" <[EMAIL PROTECTED]>
wrote:
> That's because setUp should not be used with test cases that descend from
> CakeTestCase (i.e: test cases with fixtures) or you are going to get those
> nasty side effects. Instead use their equivalents:
>
> startCase(): called ONCE during the execution of ALL test methods, and right
> before the first test method is executed
>
> endCase(): called ONCE, after all test methods have executed
>
> startTest($method): called right before EACH test method is executed, and
> the parameter $method includes the name of the test method that is about to
> start
>
> endTest($method): called right after EACH test method is executed, and the
> parameter $method includes the name of the test method that has just
> finished executing
>
> -MI
>
> ---
>
> Remember, smart coders answer ten questions for every question they ask.
> So be smart, be cool, and share your knowledge.
>
> BAKE ON!
>
> blog:http://www.MarianoIglesias.com.ar
>
> -Mensaje original-
> De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
> de Philip
> Enviado el: Jueves, 20 de Diciembre de 2007 12:50 p.m.
> Para: Cake PHP
> Asunto: Re: Bakery article on "Testing Models" -- Missing Database Table
>
> I also am finding that if I try to load the "...Test" model in the
> setUp, the Missing Database Table resurface

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



RE: Bakery article on "Testing Models" -- Missing Database Table

2007-12-20 Thread Mariano Iglesias

That's because setUp should not be used with test cases that descend from
CakeTestCase (i.e: test cases with fixtures) or you are going to get those
nasty side effects. Instead use their equivalents:

startCase(): called ONCE during the execution of ALL test methods, and right
before the first test method is executed

endCase(): called ONCE, after all test methods have executed

startTest($method): called right before EACH test method is executed, and
the parameter $method includes the name of the test method that is about to
start

endTest($method): called right after EACH test method is executed, and the
parameter $method includes the name of the test method that has just
finished executing

-MI

---

Remember, smart coders answer ten questions for every question they ask. 
So be smart, be cool, and share your knowledge. 

BAKE ON!

blog: http://www.MarianoIglesias.com.ar

-Mensaje original-
De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
de Philip
Enviado el: Jueves, 20 de Diciembre de 2007 12:50 p.m.
Para: Cake PHP
Asunto: Re: Bakery article on "Testing Models" -- Missing Database Table

I also am finding that if I try to load the "...Test" model in the
setUp, the Missing Database Table resurfaces:


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Bakery article rating

2007-12-20 Thread Yankee

Me too.

On Dec 20, 10:13 am, "dr. Hannibal Lecter" <[EMAIL PROTECTED]>
wrote:
> Hi all,
>
> does anyone else have a problem with bakery rating system? I've used
> some code from several articles and I'd like to give those guys kudos,
> but I just cant, I click on the rate link and the whole bakery deforms
> (obviously due to an AJAX request).
>
> Before you ask, yes, I _am_ logged in and all that..
>
> Hints..?
>
> Thanks in advance,
> dr. H.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Bakery article on "Testing Models" -- Missing Database Table

2007-12-20 Thread Philip

Thanks, I appreciate the suggestions.

Along the way I found a simple naming issue that was screwing up my
fixtures: I had named my file tournament_games_test_fixture.php
instead of the singular, tournament_game_test_fixture.php.

I also am finding that if I try to load the "...Test" model in the
setUp, the Missing Database Table resurfaces:

function setUp() {
$this->TestObject = new TournamentGameTest();
}


But if I instead don't use TournamentGameTest until the test, we're
fine:

  function testFindAll() {
  $this->TournamentGameTest =& new TournamentGameTest();
  $result = $this->TournamentGameTest->findAll();
//...
  }

Thanks again for your help!

- Philip


On Dec 19, 11:59 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> Look at example:
> 1) App::import instead of loadModel
> 2) in model declaration add useTable and clean unnecessery
> associations.
>   If you need some association from real model you should redeclare
> all models in this test case.
> 3) If test case declaration - need to declare fixture.
> 4) Fixture possible to create based on "cake scema generate" script
> result.
>
> App::import("Model", 'Flag');
> class FlagTest extends Flag {
> var $name = 'Flag';
> var $useTable = 'flag_tests';
> var $useDbConfig = 'test_suite';
> var $cacheSources = false;
> var $belongsTo = array();
> var $hasOne = array();
> var $hasMany = array();
> var $hasAndBelongsToMany = array();
>
> }
>
> class FlagTestCase extends CakeTestCase {
> var $TestObject = null;
> var $fixtures = array('flag_test',  );
>
> function testItShouldGroupFlags() {
> $this->Flag = new FlagTest();
> }
>
> }
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Bakery article rating

2007-12-20 Thread dr. Hannibal Lecter

Hi all,

does anyone else have a problem with bakery rating system? I've used
some code from several articles and I'd like to give those guys kudos,
but I just cant, I click on the rate link and the whole bakery deforms
(obviously due to an AJAX request).

Before you ask, yes, I _am_ logged in and all that..

Hints..?

Thanks in advance,
dr. H.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Bakery article on "Testing Models" -- Missing Database Table

2007-12-19 Thread [EMAIL PROTECTED]

Look at example:
1) App::import instead of loadModel
2) in model declaration add useTable and clean unnecessery
associations.
  If you need some association from real model you should redeclare
all models in this test case.
3) If test case declaration - need to declare fixture.
4) Fixture possible to create based on "cake scema generate" script
result.


App::import("Model", 'Flag');
class FlagTest extends Flag {
var $name = 'Flag';
var $useTable = 'flag_tests';
var $useDbConfig = 'test_suite';
var $cacheSources = false;
var $belongsTo = array();
var $hasOne = array();
var $hasMany = array();
var $hasAndBelongsToMany = array();
}



class FlagTestCase extends CakeTestCase {
var $TestObject = null;
var $fixtures = array('flag_test',  );

function testItShouldGroupFlags() {
$this->Flag = new FlagTest();
}
}

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Bakery article on "Testing Models" -- Missing Database Table

2007-12-19 Thread daphonz

I found that instead of following that article completely, I modified
one of the baked model tests, which had two extra functions, setUp and
tearDown:

class UserTestCase extends CakeTestCase {

var $fixtures = array( 'user_test' );

function setUp() {
$this->UserTest =& new User();
}

function tearDown() {
unset($this->UserTest);
}

   function testStuff() {
   }

}

And there I initialize the User model as $this->UserTest in the setUp
function.  Everything else from the article I followed, and it seemed
to work fine (with the fixture data and everything).

Hope this helps.

-Casey


On Dec 19, 2:50 pm, Philip <[EMAIL PROTECTED]> wrote:
> I'm attempting to apply the Bakery article "Testing Models with
> CakePHP 1.2 test suite" <http://bakery.cakephp.org/articles/view/
> testing-models-with-cakephp-1-2-test-suite> by Mariano Iglesias to my
> own testing, but I'm getting Missing Database Table for my *Test
> class.
>
> Is anyone successfully using these techniques and willing to volunteer
> to answer questions?   Technical details of my specific issue follow.
>
> =
> I'm try to adapt Mariano's examples to a test for the TournamentGame
> model, so my derived class should be this, right?:
>
> loadModel('TournamentGame');
>
> class TournamentGameTest extends TournamentGame {
> var $name = 'TournamentGameTest';
> var $useDbConfig = 'test_suite';
>
> }
>
> But I get this error:
>
> Missing Database Table
>
> No Database table for model TournamentGameTest (expected
> test_suite_tournament_game_tests), create it first.
>
> Notice: If you want to customize this error message, create app\views
> \errors\missing_table.ctp
>
> I was under the impression from the article that CakePHP automagically
> knows that the *Test derived class corresponds to the model, but
> perhaps I'm misunderstanding something, or perhaps it's changed in
> present versions.
>
> I notice that it's correctly applying the test_suite prefix, but I was
> under the impression that those needed tables are automatically
> created during the execution of the test.   Am I missing something
> here?
>
> I'm on SVN revision 6123, by the way.
>
> =
>
> Thanks,
>
> Philip
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Bakery article on "Testing Models" -- Missing Database Table

2007-12-19 Thread Philip

I'm attempting to apply the Bakery article "Testing Models with
CakePHP 1.2 test suite" <http://bakery.cakephp.org/articles/view/
testing-models-with-cakephp-1-2-test-suite> by Mariano Iglesias to my
own testing, but I'm getting Missing Database Table for my *Test
class.

Is anyone successfully using these techniques and willing to volunteer
to answer questions?   Technical details of my specific issue follow.

=
I'm try to adapt Mariano's examples to a test for the TournamentGame
model, so my derived class should be this, right?:


loadModel('TournamentGame');

class TournamentGameTest extends TournamentGame {
var $name = 'TournamentGameTest';
var $useDbConfig = 'test_suite';
}


But I get this error:


Missing Database Table

No Database table for model TournamentGameTest (expected
test_suite_tournament_game_tests), create it first.

Notice: If you want to customize this error message, create app\views
\errors\missing_table.ctp


I was under the impression from the article that CakePHP automagically
knows that the *Test derived class corresponds to the model, but
perhaps I'm misunderstanding something, or perhaps it's changed in
present versions.

I notice that it's correctly applying the test_suite prefix, but I was
under the impression that those needed tables are automatically
created during the execution of the test.   Am I missing something
here?

I'm on SVN revision 6123, by the way.

=

Thanks,

Philip
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Bakery Article : How to use ACL in 1.2.x

2007-08-30 Thread AJ

Great article that's really helped me a lot, thank you.

However, I'm still having a block on ACL that I can't find answers
for. So in your basic example, you can easily allow/deny access to
'posts' as a whole. However, if each post is an ACO, how do you query
the database to only show records that user has access to?

So in other words, I have a news article system on my site. Two users
have access to News, but only certain articles. Each article is an ACO
and each user is an ARO. When User A logs into their account, I want
them to only see those records they can edit, and the same with User
B. I've searched the manual, API, this list and everywhere else, and
there seems to be no answers.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Bakery Article : How to use ACL in 1.2.x

2007-08-30 Thread AJ

Great article that's really helped me a lot, thank you.

However, I'm still having a block on ACL that I can't find answers
for. So in your basic example, you can easily allow/deny access to
'posts' as a whole. However, if each post is an ACO, how do you query
the database to only show records that user has access to?

So in other words, I have a news article system on my site. Two users
have access to News, but only certain articles. Each article is an ACO
and each user is an ARO. When User A logs into their account, I want
them to only see those records they can edit, and the same with User
B. I've searched the manual, API, this list and everywhere else, and
there seems to be no answers.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



RE: Bakery Article : How to use ACL in 1.2.x

2007-07-18 Thread Mariano Iglesias

The author of the article gets an email with the comments we send from the
bakery. Also the process of submission is explained on the bakery
guidelines.

However the issue preventing from publishing most pending articles is a more
basic break of guideline rules. For example, one statement in the bakery
guidelines reads that there should be no external links to foreign sites
unless you are writing a Case Study, or providing a direct download. Yet,
the person who submitted this ACL tutorial included a signature on two of
his pending articles with a link to a classified site.

I asked him to remove such link from both articles, still waiting.

-MI

---

Remember, smart coders answer ten questions for every question they ask. 
So be smart, be cool, and share your knowledge. 

BAKE ON!

blog: http://www.MarianoIglesias.com.ar


-Mensaje original-
De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
de Samuel DeVore
Enviado el: Miércoles, 18 de Julio de 2007 10:03 p.m.
Para: cake-php@googlegroups.com
Asunto: Re: Bakery Article : How to use ACL in 1.2.x

Mariano, is is possible that people don't look for the comments?  are
they mailed to the submitter?  maybe they should.  It's possible that
people just don't know the 'process' that submissions go through?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Bakery and etc (Was Re: Bakery Article : How to use ACL in 1.2.x)

2007-07-18 Thread R. Rajesh Jeba Anbiah

On Jul 18, 6:13 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
> On 7/18/07, Pillow <[EMAIL PROTECTED]> wrote:
> > On 13 Lip, 16:16, Ketan Patel <[EMAIL PROTECTED]> wrote:
> > > I have written an article in Bakery on how to use Acl. The url 
> > > ishttp://bakery.cakephp.org/articles/view/how-to-use-acl-in-1-2-x
>
> Guys (and gals),
>
> There is usually a reason why an article that has been submitted to
> the bakery hasn't been published yet.  I am not in charge of deciding
> what articles should and should not be published, but I think we
> should respect the system and NOT post articles to the mailing list OR
> provide links to the article like Pillow just did.
   

IM*H*O, the bakery system/mechanism need to be tweaked. When
someone posts the article, as I understand there is no mechanism to
see others to see that article; even if it's wrong.

   I'd rather prefer:
Every author post his article to the group first. If there is any
technical error, the core developers or other active developers will
point out the errors and the original author can improve it and then
later submit to bakery.

FWIW, this approved article  has used
VALID_NOT_EMPTY--which is flagged as deprecated in the source 

   When an article is added to bakery, there is less room for
discussions. For any discussions, mailing list is always preferred.

   And, regarding ACL, validation, behaviour, etc, if someone shares
info in either form is always useful as a user.

--
  
Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Bakery Article : How to use ACL in 1.2.x

2007-07-18 Thread Samuel DeVore

On 7/18/07, Mariano Iglesias <[EMAIL PROTECTED]> wrote:
>
> I constantly go through the pending list, and add comments to the articles
> that are not yet published, explaining what needs to be changed.
>
> Very rarely the writer on the other side actually responds or does the
> requested changes. And most of those changes are the result of not following
> The Bakery Guidelines, which you agree upon submission.

Mariano, is is possible that people don't look for the comments?  are
they mailed to the submitter?  maybe they should.  It's possible that
people just don't know the 'process' that submissions go through?


Sam D
>
> And please DO NOT send us any emails unless you have NOT received a comment
> on your article and it's still pending publishing after some time (i.e: NOT
> three hours, but a couple of days or so)
>
> -MI
>
> ---
>
> Remember, smart coders answer ten questions for every question they ask.
> So be smart, be cool, and share your knowledge.
>
> BAKE ON!
>
> blog: http://www.MarianoIglesias.com.ar
>
> -Mensaje original-
> De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
> de Chris Hartjes
> Enviado el: Miércoles, 18 de Julio de 2007 10:13 a.m.
> Para: cake-php@googlegroups.com
> Asunto: Re: Bakery Article : How to use ACL in 1.2.x
>
> Ketan, if you want your article to get published I suggest you send an
> email to PhpNut or gwoo asking them why it hasn't shown up.  Of
> course, you are free to remove your article from the bakery and host
> it somewhere else online if you don't want to wait.
>
>
> >
>


-- 
(the old fart) the advice is free, the lack of crankiness will cost you

- its a fine line between a real question and an idiot

http://blog.samdevore.com/archives/2007/03/05/when-open-source-bugs-me/

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



RE: Bakery Article : How to use ACL in 1.2.x

2007-07-18 Thread Mariano Iglesias

I constantly go through the pending list, and add comments to the articles
that are not yet published, explaining what needs to be changed.

Very rarely the writer on the other side actually responds or does the
requested changes. And most of those changes are the result of not following
The Bakery Guidelines, which you agree upon submission.

And please DO NOT send us any emails unless you have NOT received a comment
on your article and it's still pending publishing after some time (i.e: NOT
three hours, but a couple of days or so)

-MI

---

Remember, smart coders answer ten questions for every question they ask. 
So be smart, be cool, and share your knowledge. 

BAKE ON!

blog: http://www.MarianoIglesias.com.ar

-Mensaje original-
De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
de Chris Hartjes
Enviado el: Miércoles, 18 de Julio de 2007 10:13 a.m.
Para: cake-php@googlegroups.com
Asunto: Re: Bakery Article : How to use ACL in 1.2.x

Ketan, if you want your article to get published I suggest you send an
email to PhpNut or gwoo asking them why it hasn't shown up.  Of
course, you are free to remove your article from the bakery and host
it somewhere else online if you don't want to wait.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Bakery Article : How to use ACL in 1.2.x

2007-07-18 Thread Chris Hartjes

On 7/18/07, Pillow <[EMAIL PROTECTED]> wrote:
>
> On 13 Lip, 16:16, Ketan Patel <[EMAIL PROTECTED]> wrote:
> > I have written an article in Bakery on how to use Acl. The url 
> > ishttp://bakery.cakephp.org/articles/view/how-to-use-acl-in-1-2-x

Guys (and gals),

There is usually a reason why an article that has been submitted to
the bakery hasn't been published yet.  I am not in charge of deciding
what articles should and should not be published, but I think we
should respect the system and NOT post articles to the mailing list OR
provide links to the article like Pillow just did.

Ketan, if you want your article to get published I suggest you send an
email to PhpNut or gwoo asking them why it hasn't shown up.  Of
course, you are free to remove your article from the bakery and host
it somewhere else online if you don't want to wait.

I understand your frustration but if people are going to bypass the
mechanism by which articles are vetted before they are published on
the bakery, then why put them up there?

-- 
Chris Hartjes
Senior Developer
Cake Development Corporation

My motto for 2007:  "Just build it, damnit!"

@TheBallpark - http://www.littlehart.net/attheballpark
@TheKeyboard - http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Bakery Article : How to use ACL in 1.2.x

2007-07-18 Thread Pillow

On 13 Lip, 16:16, Ketan Patel <[EMAIL PROTECTED]> wrote:
> I have written an article in Bakery on how to use Acl. The url 
> ishttp://bakery.cakephp.org/articles/view/how-to-use-acl-in-1-2-x
>
> I don't know whom to contact for getting the article published. But if
> some one senior could have a look and let me know the feedback, that
> would be great.

http://tinyurl.com/3crabr :>


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Bakery Article : How to use ACL in 1.2.x

2007-07-16 Thread Ketan Patel

Sorry about that.. The updated code is here. An array of data needs to
be passed to the Save function and I was missing that array in there.
The updated code is here and I have updated the article as well.

create();
$aro->save(array(
  'model'=>'User',
  'foreign_key'=>null,
  'parent_id'=>null,
  'alias'=>'Admin'));

$aro->create();
$aro->save(array(
  'model'=>'User',
  'foreign_key'=>null,
  'parent_id'=>null,
  'alias'=>'User'));

$aro->create();
$aro->save(array(
  'model'=>'User',
  'foreign_key'=>null,
  'parent_id'=>null,
  'alias'=>'Guest'));

$parent = $aro->findByAlias('Admin');
$parentId = $parent['Aro']['id'];

$aro->create();
$aro->save(array(
  'model'=>'User',
  'foreign_key'=>1,
  'parent_id'=>$parentId,
  'alias'=>'User::1'));



$aco = new Aco();
$aco->create();
$aco->save(array(
   'model'=>'User',
   'foreign_key'=>null,
   'parent_id'=>null,
   'alias'=>'User'));

$aco->create();
$aco->save(array(
   'model'=>'Post',
   'foreign_key'=>null,
   'parent_id'=>null,
   'alias'=>'Post'));
   }
   // Give admin full control over acos 'User' & 'Post'
   $this->Acl->allow('Admin', 'User', '*');
   $this->Acl->allow('Admin', 'Post', '*');

   // Give the user group only create & read access for 'Post'
   $this->Acl->allow('User', 'Post', array('create', 'read'));

   // Give the Guests only create access for 'User'
   $this->Acl->allow('Guest', 'User', 'create');
}
?>

On Jul 16, 1:26 pm, CakeSpork <[EMAIL PROTECTED]> wrote:
> Thanks for the reaction. I understand it is to gain concepts, I'm
> trying to gain them and your article is helping me a lot.
>
> I made a new init_acl_controller.php in /controllers/ and it gave me:
> "Parse error: syntax error, unexpected T_DOUBLE_ARROW in D:\Program
> Files\xampp\project_files2\filmsite\controllers
> \init_acl_controller.php on line 13" when trying to access /initAcl/
>
> I think I'm doing it all wrong, I just can't seem to figure out what
> I'm _supposed_ to be doing with the controller.
> 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Bakery Article : How to use ACL in 1.2.x

2007-07-16 Thread CakeSpork

Thanks for the reaction. I understand it is to gain concepts, I'm
trying to gain them and your article is helping me a lot.

I made a new init_acl_controller.php in /controllers/ and it gave me:
"Parse error: syntax error, unexpected T_DOUBLE_ARROW in D:\Program
Files\xampp\project_files2\filmsite\controllers
\init_acl_controller.php on line 13" when trying to access /initAcl/

I think I'm doing it all wrong, I just can't seem to figure out what
I'm _supposed_ to be doing with the controller.



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Bakery Article : How to use ACL in 1.2.x

2007-07-16 Thread Ketan Patel

CakeSport,

What line gives you error? Can you tell more about error ? Moreover, I
would not recommend using the code from this article in a production
environment. This code is more to gain concepts rather than use it as
is.

Ketan

CakeSpork wrote:
> Hey, really cool that you're making a tutorial about this! I just
> upgraded to 1.2 and I'm trying to use ACL's now in a proper way. I'm
> still very new at this and sort of stumbling through my project, and
> that's probably why I'm stuck with the following question: how do I
> _use_ the code from initAclController? I saved it as
> init_acl_controller in my controllers folder, tried to access it and
> it gave me errors about '=>'... I already had the suspicion I was
> doing something wrong, but I'm still kind of stuck. So, what _should_
> I be doing with the code?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Bakery Article : How to use ACL in 1.2.x

2007-07-16 Thread Ketan Patel

Geoff,

True, one should use Acl Behavior to full extent possible. The purpose
of the article is to inform use about how to use ACL in 1.2. and I
wanted to cover both aspects.

Moreover, if you just tell someone about Acl behavior, then they
should understand what is happening behind the scenes. I think that
unless one knows the manual way to do stuff, it is hard to figure out
what the automagic stuff is doing. But I definitely agree, one must
use ACL behavior once they have got the concepts.

Ketan

Geoff Ford wrote:
> @Ketan
> Aah.. so you did, but I think that anything on ACL in 1.2 should
> emphasis the behavior as it is so much easier and cleaner,
> although some may debate that it is too much magic.
>
> Geoff
> --
> http://lemoncake.wordpress.com
>
> On Jul 16, 11:33 am, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
> > On 7/15/07, Mariano Iglesias <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> > > You have seen that sometimes I get grumpier than you, so...
> >
> > Classes start tomorrow morning!  Welcome aboard! ;)
> >
> > --
> > Chris Hartjes
> > Senior Developer
> > Cake Development Corporation
> >
> > My motto for 2007:  "Just build it, damnit!"
> >
> > @TheBallpark -http://www.littlehart.net/attheballpark
> > @TheKeyboard -http://www.littlehart.net/atthekeyboard


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Bakery Article : How to use ACL in 1.2.x

2007-07-16 Thread CakeSpork

Hey, really cool that you're making a tutorial about this! I just
upgraded to 1.2 and I'm trying to use ACL's now in a proper way. I'm
still very new at this and sort of stumbling through my project, and
that's probably why I'm stuck with the following question: how do I
_use_ the code from initAclController? I saved it as
init_acl_controller in my controllers folder, tried to access it and
it gave me errors about '=>'... I already had the suspicion I was
doing something wrong, but I'm still kind of stuck. So, what _should_
I be doing with the code?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Bakery Article : How to use ACL in 1.2.x

2007-07-15 Thread Geoff Ford

@Ketan
Aah.. so you did, but I think that anything on ACL in 1.2 should
emphasis the behavior as it is so much easier and cleaner,
although some may debate that it is too much magic.

Geoff
--
http://lemoncake.wordpress.com

On Jul 16, 11:33 am, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
> On 7/15/07, Mariano Iglesias <[EMAIL PROTECTED]> wrote:
>
>
>
> > You have seen that sometimes I get grumpier than you, so...
>
> Classes start tomorrow morning!  Welcome aboard! ;)
>
> --
> Chris Hartjes
> Senior Developer
> Cake Development Corporation
>
> My motto for 2007:  "Just build it, damnit!"
>
> @TheBallpark -http://www.littlehart.net/attheballpark
> @TheKeyboard -http://www.littlehart.net/atthekeyboard


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Bakery Article : How to use ACL in 1.2.x

2007-07-15 Thread Chris Hartjes

On 7/15/07, Mariano Iglesias <[EMAIL PROTECTED]> wrote:
>
> You have seen that sometimes I get grumpier than you, so...
>

Classes start tomorrow morning!  Welcome aboard! ;)

-- 
Chris Hartjes
Senior Developer
Cake Development Corporation

My motto for 2007:  "Just build it, damnit!"

@TheBallpark - http://www.littlehart.net/attheballpark
@TheKeyboard - http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



RE: Bakery Article : How to use ACL in 1.2.x

2007-07-15 Thread Mariano Iglesias

You have seen that sometimes I get grumpier than you, so...

-MI

---

Remember, smart coders answer ten questions for every question they ask. 
So be smart, be cool, and share your knowledge. 

BAKE ON!

blog: http://www.MarianoIglesias.com.ar


-Mensaje original-
De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
de Chris Hartjes
Enviado el: Domingo, 15 de Julio de 2007 10:28 p.m.
Para: cake-php@googlegroups.com
Asunto: Re: Bakery Article : How to use ACL in 1.2.x

The school has exclusive membership...because I'm usually too grumpy
to admit anyone!


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Bakery Article : How to use ACL in 1.2.x

2007-07-15 Thread Chris Hartjes

On 7/15/07, Mariano Iglesias <[EMAIL PROTECTED]> wrote:
>
> Chris has a school? That's a new one ;)
>
> -MI

The school has exclusive membership...because I'm usually too grumpy
to admit anyone!

-- 
Chris Hartjes
Senior Developer
Cake Development Corporation

My motto for 2007:  "Just build it, damnit!"

@TheBallpark - http://www.littlehart.net/attheballpark
@TheKeyboard - http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



RE: Bakery Article : How to use ACL in 1.2.x

2007-07-15 Thread Mariano Iglesias

Chris has a school? That's a new one ;)

-MI

---

Remember, smart coders answer ten questions for every question they ask. 
So be smart, be cool, and share your knowledge. 

BAKE ON!

blog: http://www.MarianoIglesias.com.ar

-Mensaje original-
De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
de Geoff Ford
Enviado el: Domingo, 15 de Julio de 2007 08:11 p.m.
Para: Cake PHP
Asunto: Re: Bakery Article : How to use ACL in 1.2.x

I am a fan of Chris Hartjes's Fat Model, Skinny Controller school of
thought.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Bakery Article : How to use ACL in 1.2.x

2007-07-15 Thread Ketan Patel

Hi Geoff,

If you read the full article, I have covered Acl Behavior as well. I
gave user two options, use manual Acl way to handle things and another
is to use Acl Behavior. Because there are times when you want to use
manual method to create Aros & Acos. However, most of the time Acl
Behavior comes in handy. Thanks for the comments though,

Ketan

On Jul 15, 7:10 pm, Geoff Ford <[EMAIL PROTECTED]> wrote:
> @Ketan
> The article is quite good, pretty easy to read if you understand the
> basic concepts of ACL.  However, I would recommend reading about the
> AclBehavior as it will reduce the logic in your controller. I am a fan
> of Chris Hartjes's Fat Model, Skinny Controller school of thought.
>
> @Dan
> Cakephp 1.2's AclBehavior is perfect for this sort of thing - I use it
> to create Groups/Roles and then authorize on that.
> Warning: Shamless self promotion ahead :)
> I am in the process of writing a series of articles on ACL and the
> built in AclBehavior and Auth component, as I figure them out.  You
> can read the first one on AclBehavior 
> athttp://lemoncake.wordpress.com/2007/07/15/using-aclbehavior-in-cakeph...
> It doesn't explain ACL concepts, just how to use the behavior.
>
> Geoff
> --http://lemoncake.wordpress.com
>
> On Jul 16, 2:34 am, Ketan Patel <[EMAIL PROTECTED]> wrote:
>
> > On Jul 13, 3:17 pm, cakeFreak <[EMAIL PROTECTED]> wrote:
>
> > > Great Article!
>
> > > I was just wondering whether instead of building the aros for every
> > > single user, it is possible to build  the aros (and then acos) for
> > > user groups instead.
>
> > > You get the usergroup from the Auth->user session data, ACL checks if
> > > the group of that user is allowed a specific ACo and so on!
>
> > > If you Ketan could provide a bit of advice... it would be much
> > > appreciated!
>
> > > Dan
>
> > Hi Dan,
> > You could use above method to do what you want. Say for eg: You have a
> > controller reports with various actions and you wish to give only
> > users  group access to it and verify if the user has access to that
> > report controller or not?
>
> > 1. Create Aro for the UserGroup
> > 2. Create Aco for the Controller (if required, may be for actions too)
> > 3. Grant permission
> > $this->Acl->allow( 'UserGroupAro', 'ControllerAco', 'permissions')
>
> > Then, all you have to do is
> > $this->Acl->check('UserGroupAro', 'ControllerAco', 'permission');
>
> > Such method would be useful only when you have all users belonging to
> > certain group same access level to the given 'Aco' (ie. controller in
> > this case). But in case if you need more fine control like : say User
> > A and User B belongs to UserGroup Z.  UserGroup Z is given access to
> > Notes Controller which can read, create, delete and update notes in
> > Note Model.
>
> > UserA created a note which is private to user A and you do not want
> > User B to access it  then with above method, this would fail as the
> > whole UserGroup Z is given CRUD access to the NotesController, so
> > essentially all the users belonging to UserGroup Z can CRUD each
> > others record which is not good and this is when you have to use the
> > record level control as given in my article.
>
> > Hope this is what you wanted!!
> > Ketan ;-)http://www.eClassifieds4U.com-Free Classifieds with Photos


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Bakery Article : How to use ACL in 1.2.x

2007-07-15 Thread Geoff Ford

@Ketan
The article is quite good, pretty easy to read if you understand the
basic concepts of ACL.  However, I would recommend reading about the
AclBehavior as it will reduce the logic in your controller. I am a fan
of Chris Hartjes's Fat Model, Skinny Controller school of thought.


@Dan
Cakephp 1.2's AclBehavior is perfect for this sort of thing - I use it
to create Groups/Roles and then authorize on that.
Warning: Shamless self promotion ahead :)
I am in the process of writing a series of articles on ACL and the
built in AclBehavior and Auth component, as I figure them out.  You
can read the first one on AclBehavior at
http://lemoncake.wordpress.com/2007/07/15/using-aclbehavior-in-cakephp-12/
It doesn't explain ACL concepts, just how to use the behavior.

Geoff
--
http://lemoncake.wordpress.com

On Jul 16, 2:34 am, Ketan Patel <[EMAIL PROTECTED]> wrote:
> On Jul 13, 3:17 pm, cakeFreak <[EMAIL PROTECTED]> wrote:
>
> > Great Article!
>
> > I was just wondering whether instead of building the aros for every
> > single user, it is possible to build  the aros (and then acos) for
> > user groups instead.
>
> > You get the usergroup from the Auth->user session data, ACL checks if
> > the group of that user is allowed a specific ACo and so on!
>
> > If you Ketan could provide a bit of advice... it would be much
> > appreciated!
>
> > Dan
>
> Hi Dan,
> You could use above method to do what you want. Say for eg: You have a
> controller reports with various actions and you wish to give only
> users  group access to it and verify if the user has access to that
> report controller or not?
>
> 1. Create Aro for the UserGroup
> 2. Create Aco for the Controller (if required, may be for actions too)
> 3. Grant permission
> $this->Acl->allow( 'UserGroupAro', 'ControllerAco', 'permissions')
>
> Then, all you have to do is
> $this->Acl->check('UserGroupAro', 'ControllerAco', 'permission');
>
> Such method would be useful only when you have all users belonging to
> certain group same access level to the given 'Aco' (ie. controller in
> this case). But in case if you need more fine control like : say User
> A and User B belongs to UserGroup Z.  UserGroup Z is given access to
> Notes Controller which can read, create, delete and update notes in
> Note Model.
>
> UserA created a note which is private to user A and you do not want
> User B to access it  then with above method, this would fail as the
> whole UserGroup Z is given CRUD access to the NotesController, so
> essentially all the users belonging to UserGroup Z can CRUD each
> others record which is not good and this is when you have to use the
> record level control as given in my article.
>
> Hope this is what you wanted!!
> Ketan ;-)http://www.eClassifieds4U.com- Free Classifieds with Photos


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Bakery Article : How to use ACL in 1.2.x

2007-07-15 Thread Ketan Patel

On Jul 13, 3:17 pm, cakeFreak <[EMAIL PROTECTED]> wrote:
> Great Article!
>
> I was just wondering whether instead of building the aros for every
> single user, it is possible to build  the aros (and then acos) for
> user groups instead.
>
> You get the usergroup from the Auth->user session data, ACL checks if
> the group of that user is allowed a specific ACo and so on!
>
> If you Ketan could provide a bit of advice... it would be much
> appreciated!
>
> Dan

Hi Dan,
You could use above method to do what you want. Say for eg: You have a
controller reports with various actions and you wish to give only
users  group access to it and verify if the user has access to that
report controller or not?

1. Create Aro for the UserGroup
2. Create Aco for the Controller (if required, may be for actions too)
3. Grant permission
$this->Acl->allow( 'UserGroupAro', 'ControllerAco', 'permissions')

Then, all you have to do is
$this->Acl->check('UserGroupAro', 'ControllerAco', 'permission');

Such method would be useful only when you have all users belonging to
certain group same access level to the given 'Aco' (ie. controller in
this case). But in case if you need more fine control like : say User
A and User B belongs to UserGroup Z.  UserGroup Z is given access to
Notes Controller which can read, create, delete and update notes in
Note Model.

UserA created a note which is private to user A and you do not want
User B to access it  then with above method, this would fail as the
whole UserGroup Z is given CRUD access to the NotesController, so
essentially all the users belonging to UserGroup Z can CRUD each
others record which is not good and this is when you have to use the
record level control as given in my article.

Hope this is what you wanted!!
Ketan ;-)
http://www.eClassifieds4U.com - Free Classifieds with Photos


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Bakery Article : How to use ACL in 1.2.x

2007-07-13 Thread cakeFreak

Great Article!

I was just wondering whether instead of building the aros for every
single user, it is possible to build  the aros (and then acos) for
user groups instead.

You get the usergroup from the Auth->user session data, ACL checks if
the group of that user is allowed a specific ACo and so on!

If you Ketan could provide a bit of advice... it would be much
appreciated!

Dan


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Bakery Article : How to use ACL in 1.2.x

2007-07-13 Thread francky06l

Thanks a lot. I have also implemented the Auth component and have to
enhance it somehow.
Maybe I am not very "bright", I understand the concept of "record"
access, however it seems that a lot of application uses ACL on
Controller/action.

Thanks anyway, ACL is a bit tuff to learn, but I am sure the benefit
is great.
Thanks

On Jul 13, 8:10 pm, Ketan Patel <[EMAIL PROTECTED]> wrote:
> francky06l wrote:
> > Great articles, really good timing since I am investigating the ACL in
> > 1.2.
>
> > I have seen in the db_acl.php a AcoAction object, but no idea to use
> > it. I want to use ACL to control the access to controller/action,
> > however the "actions" defined in the acos_aros table does not fit all
> > the needs.
> > I could create a ACO for an action that has the controller ACO has
> > parent, and then use it in allow / deny order.
>
> > But what would be the best way to authorize all actions for a
> > controller, and deny only few for some Aro's  (minimizing the numbers
> > of Aco ?) ?
>
> > Thanks
>
> > On Jul 13, 4:16 pm, Ketan Patel <[EMAIL PROTECTED]> wrote:
>
> The case you are talking would suit some conditions which are not
> record specific. Like say in general index action of posts controller.
> You would create an Aco for Index action and check if the access is
> allowed or not. Take a look at Auth Component and take some concepts
> from there, like $actionMap and see if you could use Auth component or
> create one on your own.
>
> Map the actions to the CRUD actions and then depending on that you
> give the access. My article deals with record level access control
> which in turn can be applied to controller actions. Because each
> controller some way does interact with the records.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Bakery Article : How to use ACL in 1.2.x

2007-07-13 Thread Ketan Patel


francky06l wrote:
> Great articles, really good timing since I am investigating the ACL in
> 1.2.
>
> I have seen in the db_acl.php a AcoAction object, but no idea to use
> it. I want to use ACL to control the access to controller/action,
> however the "actions" defined in the acos_aros table does not fit all
> the needs.
> I could create a ACO for an action that has the controller ACO has
> parent, and then use it in allow / deny order.
>
> But what would be the best way to authorize all actions for a
> controller, and deny only few for some Aro's  (minimizing the numbers
> of Aco ?) ?
>
> Thanks
>
> On Jul 13, 4:16 pm, Ketan Patel <[EMAIL PROTECTED]> wrote:

The case you are talking would suit some conditions which are not
record specific. Like say in general index action of posts controller.
You would create an Aco for Index action and check if the access is
allowed or not. Take a look at Auth Component and take some concepts
from there, like $actionMap and see if you could use Auth component or
create one on your own.

Map the actions to the CRUD actions and then depending on that you
give the access. My article deals with record level access control
which in turn can be applied to controller actions. Because each
controller some way does interact with the records.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Bakery Article : How to use ACL in 1.2.x

2007-07-13 Thread francky06l

Great articles, really good timing since I am investigating the ACL in
1.2.

I have seen in the db_acl.php a AcoAction object, but no idea to use
it. I want to use ACL to control the access to controller/action,
however the "actions" defined in the acos_aros table does not fit all
the needs.
I could create a ACO for an action that has the controller ACO has
parent, and then use it in allow / deny order.

But what would be the best way to authorize all actions for a
controller, and deny only few for some Aro's  (minimizing the numbers
of Aco ?) ?

Thanks

On Jul 13, 4:16 pm, Ketan Patel <[EMAIL PROTECTED]> wrote:
> Hello All,
>
> I have written an article in Bakery on how to use Acl. The url 
> ishttp://bakery.cakephp.org/articles/view/how-to-use-acl-in-1-2-x
>
> I don't know whom to contact for getting the article published. But if
> some one senior could have a look and let me know the feedback, that
> would be great. The contents of the article are as below:
>
> How to use ACL with Cake PHP 1.2.x?
>
> By Ketan aka "ketan"
> This tutorial will brief you on how to use Acl in CakePHP 1.2.x
> versions. I had tough time figuring this out. But with help of Gwoo,
> AD7Six & others, and doing debugging and reading code, here comes the
> tutorial.
> This tutorial assumes you know basic concept of ACL and what it is
> suppossed to be used for? If not then please 
> readhttp://manual.cakephp.org/chapter/acl
>
> You can setup the databases needed for ACL through console command
> Download code cake acl initdb
>
> Now we would setup some higher level aros and acos for initial setup.
> You could do it through console. But I prefered to do it through
> controller, nothing special, just did it that way!
>
> Think of Aros (could be Users, service, etc) as the one who is
> requesting access to Acos (could be controller, actions or services).
> But in this example, we will limit Aros as the users and Acos as the
> controllers. We will setup the following Aros (users):
>
>1. Admin
>2. |-->User::1
>3. User
>4. Guest
>
> You could add more depending on your requirements, but we will stick
> to basic requirements for now. Admin, User & Guest are higher level
> group and the actual users will belong to one of these groups. 'User::
> 1' is an alias for User with user id 1. We define that user with user
> id 1 is a child of Admin and will inherit all admin previledges. Doing
> this is not essential, but you will have to define at least one user
> to be Admin, so why not do it here. Change the id to the userid
> representing the admin user on your system.
>
> We will setup the following Acos (controllers):
>
>1. User
>2. Post
>
> This would add two acos 'User' and 'Post'. But now you think if Acos
> is controller then why not have 'Posts' instead of 'Post'? Good
> question. This is because usually a controller's action can be divided
> into four types of action 'create', 'read', 'update' or 'delete' which
> are performed on a single or group of records belonging to a model.
> Hence, in this approach we going at record level Access Control. We
> want to make sure whether the current Aro (a User) has access to do
> 'C', 'R', 'U' or 'D' action on the Aco ( a record for eg. A post). If
> yes, then let him do the action otherwise don't. Now the code, that
> shows you the manual way to create aros and acos as discussed above.
>
> Controller Class:
> Download code  class InitAclController extends AppController
> {
>   var $name = 'InitAcl';
>   var $component = array('Acl');
>
>   function setupAcl()
>   {
> $aro = new aro();
>
> $aro->create();
> $aro->save(
>   'model'=>'User',
>   'foreign_key'=>null,
>   'parent_id'=>null,
>   'alias'=>'Admin');
>
> $aro->create();
> $aro->save(
>   'model'=>'User',
>   'foreign_key'=>null,
>   'parent_id'=>null,
>   'alias'=>'User');
>
> $aro->create();
> $aro->save(
>   'model'=>'User',
>   'foreign_key'=>null,
>   'parent_id'=>null,
>   'alias'=>'Guest');
>
> $parent = $aro->findByAlias('Admin');
> $parentId = $parent['Aro']['id'];
>
> $aro->create();
> $aro->save(
>   'model'=>'User',
>   'foreign_key'=>1,
>   'parent_id'=>$parentId,
>   'alias'=>'User::1');
>
> $aco = new Aco();
> $aco->create();
> $aco->save(
>'model'=>'User',
>'foreign_key'=>null,
>'parent_id'=>null,
>'alias'=>'User');
>
> $aco->create();
> $aco->save(
>'model'=>'Post',
>'foreign_key'=>null,
>'parent_id'=>null,
>'alias'=>'Post');
>}
>// Give admin full control over acos 'User' & 'Post'
>$this->Acl->allow('Admin', 'User', '*');
>$this->Acl->allow('Admin', 'Post', '*');
>
>// Give the user group only create & read access for 'Post'
>$this->Acl->allow('User', 'Post', array('create', 'read'));
>
>// Give the Guests only create access for 'User'
>$this->Acl->allow('Guest', 'User', 'creat

Bakery Article : How to use ACL in 1.2.x

2007-07-13 Thread Ketan Patel

Hello All,

I have written an article in Bakery on how to use Acl. The url is
http://bakery.cakephp.org/articles/view/how-to-use-acl-in-1-2-x

I don't know whom to contact for getting the article published. But if
some one senior could have a look and let me know the feedback, that
would be great. The contents of the article are as below:



How to use ACL with Cake PHP 1.2.x?

By Ketan aka "ketan"
This tutorial will brief you on how to use Acl in CakePHP 1.2.x
versions. I had tough time figuring this out. But with help of Gwoo,
AD7Six & others, and doing debugging and reading code, here comes the
tutorial.
This tutorial assumes you know basic concept of ACL and what it is
suppossed to be used for? If not then please read 
http://manual.cakephp.org/chapter/acl

You can setup the databases needed for ACL through console command
Download code cake acl initdb

Now we would setup some higher level aros and acos for initial setup.
You could do it through console. But I prefered to do it through
controller, nothing special, just did it that way!

Think of Aros (could be Users, service, etc) as the one who is
requesting access to Acos (could be controller, actions or services).
But in this example, we will limit Aros as the users and Acos as the
controllers. We will setup the following Aros (users):

   1. Admin
   2. |-->User::1
   3. User
   4. Guest


You could add more depending on your requirements, but we will stick
to basic requirements for now. Admin, User & Guest are higher level
group and the actual users will belong to one of these groups. 'User::
1' is an alias for User with user id 1. We define that user with user
id 1 is a child of Admin and will inherit all admin previledges. Doing
this is not essential, but you will have to define at least one user
to be Admin, so why not do it here. Change the id to the userid
representing the admin user on your system.

We will setup the following Acos (controllers):

   1. User
   2. Post



This would add two acos 'User' and 'Post'. But now you think if Acos
is controller then why not have 'Posts' instead of 'Post'? Good
question. This is because usually a controller's action can be divided
into four types of action 'create', 'read', 'update' or 'delete' which
are performed on a single or group of records belonging to a model.
Hence, in this approach we going at record level Access Control. We
want to make sure whether the current Aro (a User) has access to do
'C', 'R', 'U' or 'D' action on the Aco ( a record for eg. A post). If
yes, then let him do the action otherwise don't. Now the code, that
shows you the manual way to create aros and acos as discussed above.

Controller Class:
Download code create();
$aro->save(
  'model'=>'User',
  'foreign_key'=>null,
  'parent_id'=>null,
  'alias'=>'Admin');

$aro->create();
$aro->save(
  'model'=>'User',
  'foreign_key'=>null,
  'parent_id'=>null,
  'alias'=>'User');

$aro->create();
$aro->save(
  'model'=>'User',
  'foreign_key'=>null,
  'parent_id'=>null,
  'alias'=>'Guest');

$parent = $aro->findByAlias('Admin');
$parentId = $parent['Aro']['id'];

$aro->create();
$aro->save(
  'model'=>'User',
  'foreign_key'=>1,
  'parent_id'=>$parentId,
  'alias'=>'User::1');



$aco = new Aco();
$aco->create();
$aco->save(
   'model'=>'User',
   'foreign_key'=>null,
   'parent_id'=>null,
   'alias'=>'User');

$aco->create();
$aco->save(
   'model'=>'Post',
   'foreign_key'=>null,
   'parent_id'=>null,
   'alias'=>'Post');
   }
   // Give admin full control over acos 'User' & 'Post'
   $this->Acl->allow('Admin', 'User', '*');
   $this->Acl->allow('Admin', 'Post', '*');

   // Give the user group only create & read access for 'Post'
   $this->Acl->allow('User', 'Post', array('create', 'read'));

   // Give the Guests only create access for 'User'
   $this->Acl->allow('Guest', 'User', 'create');
}
?>

Above you saw that using Acl, we granted the Admin full rights over
'User' and 'Post' Acos. ie. Admin can do CRUD for all user and post,
which in turn means that for any controller action which involves
creating, reading, updating or deleting a 'User' or 'Post' record,
Admin group is allowed to do it. So does any user that belongs to
group Admin.

'User' aro is allowed to do only create & read action for 'Post' acos,
which means that a 'User' group in general has access to a controller
action that can create and read 'post' records, which is what we want.
We want that any user that belongs to 'User' group can create new
posts and read posts. But we do not want all users (aros) to 'update'
or 'delete' any 'Post' (acos) they want. Which means, that belonging
to a 'User' group does not give you any previledges to 'U', 'D'
actions of 'Post' (acos). But you want to have 'U', 'D' action for the
user who created that Post!! I will get to giving user who created
post the full CRUD rights late

ImageHelper (update to bakery article)

2007-06-04 Thread Jon Bennett

hi bakers,

I've been using the ImageHelper from the bakery [1] in a project, but
found it's method of caching all images in a single folder very
restrictive, as I tend to have multiple tables in my DB and multiple
sub-directories for images in my apps.

To get around this I tweaked the existing helper so it creates a cache
directory for the location of the image file, rather than a single
global location, eg:

orginal image: /img/test.jpg
cached image: /img/cache/xx_xx_test.jpg

orginal image: /img/events/test.jpg
cached img: /img/events/cache/xx_xx_test.jpg

anyhoo, hope it's useful for some people.

Get class from: http://cakeforge.org/snippet/detail.php?type=snippet&id=188

cheers,

Jon

-- 

jon bennett
t: +44 (0) 1225 341 039 w: http://www.jben.net/
iChat (AIM): jbendotnet Skype: jon-bennett

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



RE: Bakery Article

2007-03-26 Thread Mariano Iglesias

This is the problem we discussed gwoo. Should be fixed today.

-MI

---

Remember, smart coders answer ten questions for every question they ask. 
So be smart, be cool, and share your knowledge. 

BAKE ON!

blog: http://www.MarianoIglesias.com.ar


-Mensaje original-
De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
de gwoo
Enviado el: Lunes, 26 de Marzo de 2007 02:27 p.m.
Para: Cake PHP
Asunto: Re: Bakery Article

Please submit bug reports to https://trac.cakephp.org/newticket.



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Bakery Article

2007-03-26 Thread Erich C. Beyrent


Forbidden

TICKET_CREATE privileges are required to perform this operation

TracGuide — The Trac User and Administration Guide


gwoo wrote:
> Please submit bug reports to https://trac.cakephp.org/newticket.
> 
> 
> > 

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Bakery Article

2007-03-26 Thread gwoo

Please submit bug reports to https://trac.cakephp.org/newticket.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Bakery Article

2007-03-26 Thread Erich C. Beyrent

I am trying to add a new article to the Bakery, but there are no 
categories.  The article cannot be submitted without a category, so I'm 
stuck.

Can the person/people who maintain the Bakery take a look at this?

-Erich-

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---