Changes between Version 5 and Version 6 of DbAuthPlugin


Ignore:
Timestamp:
Jun 8, 2006 10:44:02 PM (8 years ago)
Author:
brad
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DbAuthPlugin

    v5 v6  
    33== Description == 
    44 
    5 A plugin to replace the default Trac auth plugin.  It allows for users/groups to be stored in a database ('''SQLite''', and soon, PostgreSQL, MySQL, MS SQL), true login/logout, can serve multiple projects, and maintains cookies so you can keep the login for longer than just one session. 
     5A plugin to replace the default Trac auth plugin.  It allows for users/groups to be stored in a database ('''SQLite''', '''PostgreSQL''', '''MySQL'''), true login/logout, can serve multiple projects, and maintains cookies so you can keep the login for longer than just one session. 
    66 
    77== Bugs/Feature Requests ==  
     
    2323== Usage / Install == 
    2424 
    25  * In the [source:dbauthplugin/0.9/install/ install/] directory, you will find a SQLite script to create the three tables needed.  You will then have to populate those tables with insert statements.  The ''envname'' fields in each of the tables is the name of your Trac environment.  Note the 'all' ''envname'' will allow the user to be in all environments, but have only one row in the table (multiple projects). 
     25 * In the [source:dbauthplugin/0.10/install/ install/] directory, you will find SQLite and MySQL scripts to create the three tables needed.  You will then have to populate those tables with insert statements.  The ''envname'' fields in each of the tables is the name of your Trac environment.  Note the 'all' ''envname'' will allow the user to be in all environments, but have only one row in the table (multiple projects). 
    2626{{{ 
    2727sqlite> insert into trac_permissions values ('all', 'brad', 'admins'); 
     
    3232% trac-admin /path/to/env permission add admins TRAC_ADMIN 
    3333}}} 
    34  * If you would like to '''restrict_owner''' on tickets to only be the users in your tables, you need to make use of the [source:userdir.py userdir.py] file.  You will need to see [http://projects.edgewall.com/trac/ticket/2456 Ticket 2456 at p.e.c], and patch Trac accordingly. 
     34 * If you would like to '''restrict_owner''' on tickets to only be the users in your tables, you need to make use of the [source:userdir.py userdir.py] file.  You will need to see [http://projects.edgewall.com/trac/ticket/2456 Ticket 2456 at p.e.c], and patch Trac accordingly.  This wasn't heavily tested with the 0.10 version in [838]. 
    3535 * Make these changes in the global trac.ini file, or your environment's trac.ini file.  The global one may make more sense, because this plugin is used across environments: 
    3636{{{ 
    3737[components] 
    3838trac.web.auth.* = disabled 
     39#trac.userdir.* = enabled  # only if you want to use this 
     40#webadmin.* = enabled 
    3941dbauth.* = enabled 
    40 trac.userdir.* = enabled  # only if you want to use this 
    4142 
    42 [central] 
    43 database = /home/brad/dev/python/trac-dbauth/install/dbauth.db 
     43[dbauth] 
     44#database = sqlite:/home/brad/dev/python/trac-dbauth/0.10/install/dbauth.db 
     45database = mysql://brad:brad@localhost/dbauth 
    4446envroot = /var/trac/ 
     47 
     48users_table = trac_users 
     49users_envname_field = envname 
     50users_username_field = username 
     51users_password_field = password 
     52users_email_field = email 
     53 
     54perms_table = trac_permissions 
     55perms_envname_field = envname 
     56perms_username_field = username 
     57perms_groupname_field = groupname 
     58 
     59cookies_table = trac_cookies 
     60cookies_envname_field = envname 
     61cookies_cookie_field = cookie 
     62cookies_username_field = username 
     63cookies_ipnr_field = ipnr 
     64cookies_unixtime_field = unixtime 
    4565}}} 
    46  * As of [428], I only have SQLite working, but want to have a !CentralDatabaseManager that can do more backends.  It appears that this will have to be for the 0.10.x and higher branches. 
     66 * As of [838], a !CentralDatabaseManager now supports all database backends that Trac works with.  SQLite, MySQL, Postgresql 
    4767 
    4868== Example ==