Changes between Version 16 and Version 17 of DbAuthPlugin


Ignore:
Timestamp:
Aug 7, 2013, 10:39:55 PM (15 months ago)
Author:
rjollos
Comment:

Improve deprecation notice.

Legend:

Unmodified
Added
Removed
Modified
  • DbAuthPlugin

    v16 v17  
     1[[PageOutline(2-5,Contents,pullout)]]
    12= DB Authentication Plugin =
    23
    3 == DEPRECATED ==
    4 
    5 If you want a DB-based authentication system, use [wiki:AccountManagerPlugin AccountManager] and the !SessionStore backend. If you need a more custom database layout, you should just make a custom password store for !AccountManager.
     4{{{
     5#!html
     6<div class="system-message" float="left" overflow="auto">
     7This plugin is deprecated. Please use the <a href="http://trac-hacks.org/wiki/AccountManagerPlugin">AccountManagerPlugin</a> with the <a href="http://trac-hacks.org/wiki/CookBook/AccountManagerPluginConfiguration#SessionStore">SessionStore</a> backend. If you need a more custom database layout, you should just make a custom password store for AccountManager.
     8</div>
     9}}}
    610
    711== Description ==
     
    2630
    2731== Usage / Install ==
    28 These usage/install notes are for the version that works with Trac 0.10.  If you are still working with DbAuthPlugin for Trac 0.9, see [http://www.trac-hacks.org/wiki/DbAuthPlugin?version=4 this version] of the wiki page.
     32These usage/install notes are for the version that works with Trac 0.10.  If you are still working with DbAuthPlugin for Trac 0.9, see [/wiki/DbAuthPlugin?version=4 this version] of the wiki page.
    2933 * 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).
    30 {{{
    31 sqlite> insert into trac_permissions values ('all', 'brad', 'admins');
    32 sqlite> insert into trac_users values ('all','brad','brad','brad@dsource.org');
     34 {{{#!sh
     35$ sqlite> insert into trac_permissions values ('all', 'brad', 'admins');
     36$ sqlite> insert into trac_users values ('all','brad','brad','brad@dsource.org');
    3337}}}
    3438 * Example of loading table:
    35 {{{
    36 sqlite3 /path/to/project/db/trac.db < create-tables-sqlite-3.0.sql
     39 {{{#!sh
     40$ sqlite3 /path/to/project/db/trac.db < create-tables-sqlite-3.0.sql
    3741}}}
    3842 * If you add users/groups to the table(s), you'll need to give them permissions in trac-admin or webadmin plugin.
    39 {{{
    40 % trac-admin /path/to/env permission add admins TRAC_ADMIN
     43 {{{#!sh
     44$ trac-admin /path/to/env permission add admins TRAC_ADMIN
    4145}}}
    42  * 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].
     46 * 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 [t:#2456 Ticket 2456 at t.e.o], and patch Trac accordingly.  This wasn't heavily tested with the 0.10 version in [838].
    4347 * 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:
    44 {{{
     48 {{{#!ini
    4549[components]
    4650trac.web.auth.* = disabled
     
    7781 * Notes from anonymous via #1878:
    7882   * Eggs are built with
    79 {{{
     83{{{#!sh
    8084# python setup.py bdist_egg
    8185}}}
    8286   * There is a need for the egg to cache.  I had to add to my apache2 conf the following line:
    83 {{{
     87{{{#!apache
    8488SetEnv PYTHON_EGG_CACHE {trac.environ}/egg_cache
    8589}}}
     
    97101
    98102'''Author:''' [wiki:brad] [[BR]]
     103'''Maintainer:''' [wiki:brad] [[BR]]
    99104'''Contributors:''' Karol Krizka, borrowed heavily from Jonas's original work