Factlink / pavlov

Provides a Command/Query/Interactor framework.
MIT License
22 stars 4 forks source link

Authorization check should be run before the validity check #3

Closed RSO closed 11 years ago

markijbema commented 11 years ago

Hey Remon, why should this happen? Because at least part of the validation (the ones by virtus) will probably be run before the authorization. Would it be sufficient if validate runs after check_authorization (but virtus validations will run before checking authorization)?

marten commented 11 years ago

What do you mean with Virtus validations? The presence of given attrributes or defaults is (currently) performed (as the first thing) in the #validate method, not during #initialize. If Github weren't being tremendously slow right now I'd link you to the file.

RSO commented 11 years ago

@markijbema, this issue is 6 months old, and I'm not quite sure what I meant here. I can imagine that things have changed in the past 6 months, so maybe this issue can be closed?

markijbema commented 11 years ago

Oh sorry, I thought it also did basic validation, but maybe I mixed it up, sry. Closing since it doesn't seem relevant.