On Mar 15, 2010, at 2:28 PM, Thomas Rabaix wrote:

> I get your point, but you didn't reply to my question.
> 
> How do you validate your data against different user permissions ? This is a 
> common usage of web framework, a front user can only edit a restricted number 
> of fields whereas an admin user can edit all fields ...

that's the controller's responsibility.   the model is responsible for 
validating that the data that gets saved is correct, regardless of the source.

> 
> 
> On Mon, Mar 15, 2010 at 7:19 PM, Jacob Coby <[email protected]> wrote:
> 
> On Mar 15, 2010, at 2:12 PM, Thomas Rabaix wrote:
> 
> > I never understood why validation should be at the model level (1). Do you 
> > have the same validation with frontend or backend application ?
> 
> yes, of course.  you're validating data.  it doesn't matter where it comes 
> from.
> 
> > what about user's permissions, how to you manage this at the model level ?
> 
> that's the controller's responsibility.
> >
> > [1] model should only check data integrity constraint
> 
> in traditional MVC, this is absolutely untrue.
> 
> >
> > On Mon, Mar 15, 2010 at 7:05 PM, Jacob Coby <[email protected]> wrote:
> >
> > On Mar 14, 2010, at 4:16 PM, Bernhard Schussek wrote:
> >
> > > The validation in Symfony 2 is handled by a seperate Validator
> > > component. Its meta data, i.e. validated classes, properties and also
> > > error messages can all easily be accessed. Parsing the meta data for
> > > error messages and writing the non-translated ones to a file should
> > > not be a problem.
> >
> > Why not make the models responsible for data validation?  I've never 
> > understood the desire to require the use of form objects.
> >
> > --
> > Jacob Coby
> >
> >
> >
> >
> >
> >
> > --
> > If you want to report a vulnerability issue on symfony, please send it to 
> > security at symfony-project.com
> >
> > You received this message because you are subscribed to the Google
> > Groups "symfony developers" group.
> > To post to this group, send email to [email protected]
> > To unsubscribe from this group, send email to
> > [email protected]
> > For more options, visit this group at
> > http://groups.google.com/group/symfony-devs?hl=en
> >
> >
> >
> > --
> > Thomas Rabaix
> > http://rabaix.net
> >
> > --
> > If you want to report a vulnerability issue on symfony, please send it to 
> > security at symfony-project.com
> >
> > You received this message because you are subscribed to the Google
> > Groups "symfony developers" group.
> > To post to this group, send email to [email protected]
> > To unsubscribe from this group, send email to
> > [email protected]
> > For more options, visit this group at
> > http://groups.google.com/group/symfony-devs?hl=en
> 
> --
> Jacob Coby
> 
> 
> 
> 
> 
> 
> --
> If you want to report a vulnerability issue on symfony, please send it to 
> security at symfony-project.com
> 
> You received this message because you are subscribed to the Google
> Groups "symfony developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/symfony-devs?hl=en
> 
> 
> 
> -- 
> Thomas Rabaix
> http://rabaix.net
> 
> -- 
> If you want to report a vulnerability issue on symfony, please send it to 
> security at symfony-project.com
>  
> You received this message because you are subscribed to the Google
> Groups "symfony developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/symfony-devs?hl=en

--
Jacob Coby






-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en

Reply via email to