You can perform user authentication and make sure the user owns this
particular article before updating it.
Then if it is another user, the update will fail anyway so no danger there.

You can also use unset($this->data['Post']['id']) in the "add" action to
make sure the id is not set. (since the user authentication will only be
performed in the "edit" action)

On Fri, Aug 19, 2011 at 11:33 AM, Zaky Katalan-Ezra <[email protected]>wrote:

> You can't prevent editing the article and replacing the whole text.
> You can set the title to disable if a week passed since the article
> created.
>
>
> On Fri, Aug 19, 2011 at 10:42 AM, Teddy Zeenny <[email protected]>wrote:
>
>> *Now instead of posting, If someone try to post a new story with old
>> post's id what will happen?*
>>
>> How could that happen ? Isn't your post id a database auto-increment ?
>>
>>
>> On Fri, Aug 19, 2011 at 10:09 AM, Prabha vathi 
>> <[email protected]>wrote:
>>
>>> Hi,
>>>
>>> I have created a site, where people can also post. If we pass id, cakephp
>>> will update.
>>>
>>> Now instead of posting, If someone try to post a new story with old
>>> post's id what will happen?
>>> How to avoid such a things happening?
>>>
>>> --
>>> 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
>>> [email protected] For more options, visit this group
>>> at http://groups.google.com/group/cake-php
>>>
>>
>>  --
>> 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
>> [email protected] For more options, visit this group
>> at http://groups.google.com/group/cake-php
>>
>
>
>
> --
> Regards,
> Zaky Katalan-Ezra
> QA Administrator
> www.IGeneriX.com
> Sites.IGeneriX.com
> 054-7762312
>
> --
> 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
> [email protected] For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
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
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to