[Opensource] Best practices request on adding ControllerSecurity rows

Michael Rimov rimovm at centercomp.com
Wed Jan 15 14:39:21 PST 2003


At 01:00 PM 1/15/2003 -0800, you wrote:
>oh, good idea.  4) sounds good to me too.
>
>larry
>
>At 07:01 AM 1/15/2003, you wrote:
>
> >I'm wondering what would we suggest as being a best practice or simply 
> what are options for adding controller security rows of the controllers 
> that we create.
> >
> >Currently DBObjects have the ability to have a call the method 
> DBObjects.populateDefaultValues() which we define in there what the 
> default values are, but nothing like that exist for Controllers and them 
> adding defaultvalues into the controllersecurity table.  The DBTool 
> currently is the place holder for populating the expresso only default 
> values for Expresso's controllers like the LoginController, 
> RegitrationController, bla bla.
> >
> >As I see it here are my options
> >
> >1. Extend DBTool and add my rows as they had done (not recommend)
> >2. Investigate it the DBTool import works and try placing them in a XML 
> file for import.
> >3. Use the Schema.populateSchemaData() ??? Not sure what this method was 
> intended for. (I like this... maybe)

For the record, this one was to allow Schemas to add any records that 
couldn't be added in PopulateDefaultValues in a table due to table 
constraints... ie table X values depended on Table Y values, but table Y 
wasn't necessarily populated yet.  In the past, this is actually where I've 
done my own security (such as add my own groups, etc) since it is 
guaranteed that it is the last population to take place.  But I would 
certainly like to see something better.


> >4. Modify DBController to have a method like the DBObject to populate 
> security.  (I like this)

I think this is already there:

     /**
      * Allows for DBCreate to set up proper default
      * values for views, etc.
      * @param dbName the name of the db to add these values to.
      * @see com.jcorporate.eforum.controller.Browse for an example usage
      * @throws DBException
      */
     public void setupDefaultValues(String dbName)
                             throws DBException {
         }

I found this in eForum browse controller... haven't verified that it really 
gets called, though :)  Let me know if it isn't actually part of the 
DBCreate stuff.

Hope this clarifies!
                                                 -Mike





More information about the Opensource mailing list