Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #76 (closed defect: fixed)

Opened 14 years ago

Last modified 12 years ago

Identity tables can overlap applications table

Reported by: anonymous Owned by: Jeff Watkins
Priority: normal Milestone: 0.9
Component: Identity Version:
Severity: normal Keywords:
Cc:

Description

Identity will create tables User_table, Permissions, groups.

This can generate issues, I would suggest to have names like: identity_user, identity_group, identity_permissions.

Attachments

Ticket_76.txt Download (1.4 KB) - added by plewis@… 14 years ago.
Patch
Ticket_76_better.txt Download (3.1 KB) - added by plewis@… 14 years ago.
More complete patch

Change History

comment:1 Changed 14 years ago by anonymous

  • Component changed from CherryPy to TurboGears

comment:2 Changed 14 years ago by kevin

  • Milestone set to 0.9

there was also mention of a namespaces SQLObject feature on the mailing list. I've never used it, but it sounds like the right thing to do.

comment:3 Changed 14 years ago by kevin

  • Component changed from TurboGears to Identity

comment:4 Changed 14 years ago by jchu@…

It's also worth noting that you can replace/override these with your own model objects. You just have to specify a different identity.soprovider.model in your cfg.

Changed 14 years ago by plewis@…

Patch

comment:5 Changed 14 years ago by plewis@…

The submitted patch a) prepends all database tables with the prefix "turbogears_" and b) puts the SQLObjects in a "turbogears" registry (namespace). This breaks existing identity setups. Now that I'm writing this, I realized that I will need to change identity code to refer to the proper namespace, too. More to come.

Changed 14 years ago by plewis@…

More complete patch

comment:6 Changed 14 years ago by plewis@…

Ok, revised the patch so the default identity framework uses the updated namespace. I tested this in Jeff Watkins's identity framework sample, and it appears to work properly after I delete the old tables and add the new ones. It also doesn't conflict with my existing class named User.

comment:7 Changed 14 years ago by michele

Please take a look at this also, is another possible solution, extracted from yesterday chat:

mbevan	tazzzzz: The namespace issue re: identity_user, etc. can be resolved automatically by sqlobject.  See: http://sqlobject.org/SQLObject.html#class-sqlmeta	
mbevan	http://sqlobject.org/SQLObject.html#class-sqlmeta   - registry property, that is.
mbevan	It would be useful, I think, to have a "turbogears" registry.

comment:8 Changed 14 years ago by jeff@…

  • Status changed from new to assigned

I've applied this patch and will be checking it in tomorrow after I've had time to test it a bit.

comment:9 Changed 14 years ago by anonymous

  • Status changed from assigned to new
  • Owner changed from anonymous to Jeff Watkins

comment:10 Changed 14 years ago by jeff@…

  • Status changed from new to closed
  • Resolution set to fixed

I checked in code to address this last night.

Note: See TracTickets for help on using tickets.