turbine-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From USchm...@gea-wiegand.de
Subject Antwort: inserting user into mysql for use with turbine security
Date Wed, 14 Jan 2004 16:47:50 GMT




Hello Chris

you should add users by using the methods exposed by the security
framework.

adding a user looks like (or something like that ...):

      user = (TorqueUser) TurbineSecurity.getUserInstance();
      user.setCreateDate(new Date());
      user.setName(p.getString("name"));
      user.setNew(true);
      TurbineSecurity.addUser(user,p.getString("password"));

there are also methods for adding groups or roles, and for adding users to
groups etc.
Have a look at the java docs of the security framework !

Hope that helps

/uwe



                                                                                         
                                              
                      Chris Joelly                                                       
                                              
                      <chris.joelly@uny        An:       turbine-user@jakarta.apache.org
                                               
                      com.com>                 Kopie:                                 
                                                 
                                               Thema:    inserting user into mysql for use
with turbine security                        
                      14.01.2004 17:37                                                   
                                              
                      Bitte antworten                                                    
                                              
                      an "Turbine Users                                                  
                                              
                      List"                                                              
                                              
                                                                                         
                                              




Hello!

i want to insert/update an user from within my application for use with
turbine security. i looked at the datamodel and have inserted the user
with the following statements into TURBINE_USER and TURBINE_USER_GROUP_ROLE


insert into TURBINE_USER (USER_ID, LOGIN_NAME, PASSWORD_VALUE, FIRST_NAME,
LAST_NAME)
             values (1001, 'portal', 'portal', 'APortal', 'User');

insert into TURBINE_USER_GROUP_ROLE (USER_ID, GROUP_ID, ROLE_ID)
             values (1001, 1, 2);

are there any other tables to set? the group and role used in this
example does exist, but i can't login with this user ...

thx, Chris

--
mit freundlichen Grüßen / with kind regards

Ing. Christian Jölly @ Solutions
unycom  Information Technology Services GmbH
A-8042 Graz | Schmiedlstraße 1 / III

Tel: ++43 (0)316 / 818 828 - 30
Fax: ++43 (0)316 / 818 828 - 38
chris.joelly@unycom.com
http://www.unycom.com

Christel zu Oli (es ging um /etc/apt/sources.list):

"Unstable?!  Bist Du bescheuert?"

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org






---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Mime
View raw message