Re: Security Model?

From: Mike Kienenberger (mkienen..laska.net)
Date: Mon May 17 2004 - 11:33:07 EDT

  • Next message: Andrus Adamchik: "Re: Security Model?"

    Mehdi Bennani <mbennan..reebalance.com> wrote:
    > We are thinking of build this model around the objEntities as the smallest
    level of granularity. It could certainely be used at the datacontext level
    also...
    > So, I was wondering if you already had an idea on how/where this could be
    plugged in...

    I log all database changes by using a "setAndLogX" DataObject method that
    takes extra arguments rather than using "setX".

    I do this by changing the standard DataObject methods setX() to private,
    then creating something along the lines of

    public void setAndLogX([Logging Parameters,] Object value)
    {
            // do stuff

        this.setX(value);
    }

    I have modified the cayenne class generation templates to automatically
    create these methods, so it's trivial to create new entities and attributes
    just by rebuilding the dataobject classes.

    You could certainly do something similar by passing security parameters
    rather than logging parameters. You could go a step further and require
    the same signatures for "getX" methods.



    This archive was generated by hypermail 2.0.0 : Mon May 17 2004 - 11:31:44 EDT