I posted this proposal a while ago, but it went
almost unnoticed (thanks for a +1 Sean).
<proposal>
Default schema of TURBINE_USER table contains the minimal
subset of user information that is useful to the widest
range of applications possible.
The following fields are included:
first name
last name
email address
If application needs to process more information about
an user the following actions can be performed
1) The application may define custom keys for User.getPerm/
setPerm methods, and uses those methods for accesing
user information. Consult User interface for key values
that are reserved for use by Turbine.
2) Application may extend TurbineUser class to provide
accessor methods for the custom user attributes.
This class can be configured by usabe by UserManager
(services.TurbineSecurityService.user.class=...)
and then applicaton may cast the result of RunData.getUser()
call to this class to use the accessor methods
3) If searching capability is desired upon the values
of certain custom user attributes, the fields for storing
these attributes may be appended to the TURBINE_USER
table schema. This action may be performed by DB adminstrator
by issuing a sequence of SQL statemets
ALTER TABLE TURBINE_USER ADD name type
The names of the fields must be identical to the keys
used in getPerm/serPerm methods, and the field types must
be compatibe to Java types of the corresponding attributes.
After adding these fields to the DB they may be used for
building Criteria objects to be used with UserManager.getUsers()
method.
No other actions need to be taken by application creator/deployer
than those described above to provide the described functionality.
Everything else is handled behind the scenes by DBUserManger and
TurbineUserPeer classes.
</proposal>
Here is the update XML schema of the db. Note that some field
names were changed to be more consistent/prettier.
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<!DOCTYPE database SYSTEM "../torque/dtd/database.dtd">
<!--
==================================================================== -->
<!--
-->
<!-- B A S E T U R B I N E S C H E M
A -->
<!--
-->
<!--
==================================================================== -->
<!-- This is the the XML schema used by Torque to generate the
necessary -->
<!-- sources used to create/initialize the base Turbine system.
Torque -->
<!-- will create the SQL for the database required by Turbine, and
the -->
<!-- Peer-based Object Model used by Turbine internally to
manage -->
<!-- users, security, and job
scheduling. -->
<!--
==================================================================== -->
<!-- @author: <a href="mailto:[EMAIL PROTECTED]">Jason van
Zyl</a> -->
<!-- @version $Id: turbine-schema.xml,v 1.6 2000/11/20 23:57:02 jvanzyl
Exp $ -->
<!--
==================================================================== -->
<database>
<table name="TURBINE_PERMISSION">
<column name="PERMISSION_ID" required="true" autoIncrement="true"
primaryKey="true" type="INTEGER"/>
<column name="PERMISSION_NAME" required="true" size="99"
type="VARCHAR"/>
<column name="OBJECTDATA" type="VARBINARY"/>
<unique>
<unique-column name="PERMISSION_NAME"/>
</unique>
</table>
<table name="TURBINE_ROLE">
<column name="ROLE_ID" required="true" autoIncrement="true"
primaryKey="true" type="INTEGER"/>
<column name="ROLE_NAME" required="true" size="99" type="VARCHAR"/>
<column name="OBJECTDATA" type="VARBINARY"/>
<unique>
<unique-column name="ROLE_NAME"/>
</unique>
</table>
<table name="TURBINE_GROUP">
<column name="GROUP_ID" required="true" autoIncrement="true"
primaryKey="true" type="INTEGER"/>
<column name="GROUP_NAME" required="true" type="VARCHAR" size="99"/>
<column name="OBJECTDATA" type="VARBINARY"/>
<unique>
<unique-column name="GROUP_NAME"/>
</unique>
</table>
<table name="TURBINE_ROLE_PERMISSION">
<column name="ROLE_ID" required="true" index="true"
primaryKey="true" type="INTEGER"/>
<column name="PERMISSION_ID" required="true" index="true"
primaryKey="true" type="INTEGER"/>
<index name="ROLE_PERMISSION_INDEX">
<index-column name="ROLE_ID"/>
<index-column name="PERMISSION_ID"/>
</index>
<foreign-key foreignTable="TURBINE_ROLE">
<reference local="ROLE_ID" foreign="ROLE_ID"/>
</foreign-key>
<foreign-key foreignTable="TURBINE_PERMISSION">
<reference local="PERMISSION_ID" foreign="PERMISSION_ID"/>
</foreign-key>
</table>
<table name="TURBINE_USER">
<column name="USER_ID" required="true" autoIncrement="true"
primaryKey="true" type="INTEGER"/>
<column name="LOGIN_NAME" required="true" size="32" type="VARCHAR"/>
<column name="PASSWORD_VALUE" required="true" size="32"
type="VARCHAR"/>
<column name="FIRST_NAME" required="true" size="99" type="VARCHAR"/>
<column name="LAST_NAME" required="true" size="99" type="VARCHAR"/>
<column name="EMAIL" size="99" type="VARCHAR"/>
<column name="CONFIRM_VALUE" size="99" type="VARCHAR"/>
<column name="MODIFIED" type="TIMESTAMP"/>
<column name="CREATED" type="TIMESTAMP"/>
<column name="LASTLOGIN" type="TIMESTAMP"/>
<column name="OBJECTDATA" type="VARBINARY"/>
<unique>
<unique-column name="LOGIN_NAME"/>
</unique>
</table>
<table name="TURBINE_USER_GROUP_ROLE">
<column name="USER_ID" required="true" primaryKey="true"
type="INTEGER"/>
<column name="GROUP_ID" required="true" primaryKey="true"
type="INTEGER"/>
<column name="ROLE_ID" required="true" primaryKey="true"
type="INTEGER"/>
<index name="USER_GROUP_ROLE_INDEX">
<index-column name="USER_ID"/>
<index-column name="GROUP_ID"/>
<index-column name="ROLE_ID"/>
</index>
<foreign-key foreignTable="TURBINE_USER">
<reference local="USER_ID" foreign="USER_ID"/>
</foreign-key>
<foreign-key foreignTable="TURBINE_GROUP">
<reference local="GROUP_ID" foreign="GROUP_ID"/>
</foreign-key>
<foreign-key foreignTable="TURBINE_USER_ROLE">
<reference local="ROLE_ID" foreign="ROLE_ID"/>
</foreign-key>
</table>
<table name="TURBINE_SCHEDULED_JOB">
<column name="JOB_ID" required="true" primaryKey="true"
type="INTEGER"/>
<column name="SECOND" default="-1" required="true" type="INTEGER"/>
<column name="MINUTE" default="-1" required="true" type="INTEGER"/>
<column name="HOUR" default="-1" required="true" type="INTEGER"/>
<column name="WEEK_DAY" default="-1" required="true"
type="INTEGER"/>
<column name="DAY_OF_MONTH" default="-1" required="true"
type="INTEGER"/>
<column name="TASK" required="true" size="99" type="VARCHAR"/>
<column name="EMAIL" size="99" type="VARCHAR"/>
</table>
</database>
--
Rafal Krzewski
Senior Internet Developer
mailto:[EMAIL PROTECTED]
+48 22 8534830 http://e-point.pl
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]