From 868f40a1fce89c338a50290437afc6834fcf094d Mon Sep 17 00:00:00 2001 From: Aaron Bentley Date: Tue, 11 Apr 2006 12:03:28 -0400 Subject: Enable identity tracking --- Bugs-Everywhere-Web/beweb/model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Bugs-Everywhere-Web/beweb/model.py') diff --git a/Bugs-Everywhere-Web/beweb/model.py b/Bugs-Everywhere-Web/beweb/model.py index e20d1ce..33d2d2f 100644 --- a/Bugs-Everywhere-Web/beweb/model.py +++ b/Bugs-Everywhere-Web/beweb/model.py @@ -1,7 +1,7 @@ from sqlobject import * from turbogears.database import PackageHub # Uncomment the following line if you wish to use Identity and SO_Provider -# from turbogears.identity.soprovider import TG_User, TG_Group, TG_Permission +from turbogears.identity.soprovider import TG_User, TG_Group, TG_Permission hub = PackageHub("beweb") __connection__ = hub -- cgit From ec4b4a390bff3a0225681380ae949e6da64401c6 Mon Sep 17 00:00:00 2001 From: Aaron Bentley Date: Tue, 11 Apr 2006 16:41:47 -0400 Subject: Use people listings from identity framework, not config, on bug pages. --- Bugs-Everywhere-Web/beweb/model.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Bugs-Everywhere-Web/beweb/model.py') diff --git a/Bugs-Everywhere-Web/beweb/model.py b/Bugs-Everywhere-Web/beweb/model.py index 33d2d2f..2bda299 100644 --- a/Bugs-Everywhere-Web/beweb/model.py +++ b/Bugs-Everywhere-Web/beweb/model.py @@ -6,5 +6,8 @@ from turbogears.identity.soprovider import TG_User, TG_Group, TG_Permission hub = PackageHub("beweb") __connection__ = hub +def people_map(): + return dict([(u.userId, u.displayName) for u in TG_User.select()]) + # class YourDataClass(SQLObject): # pass -- cgit From 3edaf3974b197c89189803b2f99834fd8d735c64 Mon Sep 17 00:00:00 2001 From: Aaron Bentley Date: Tue, 11 Apr 2006 18:32:26 -0400 Subject: Used identity for new comments and bugs --- Bugs-Everywhere-Web/beweb/model.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Bugs-Everywhere-Web/beweb/model.py') diff --git a/Bugs-Everywhere-Web/beweb/model.py b/Bugs-Everywhere-Web/beweb/model.py index 2bda299..6a603bb 100644 --- a/Bugs-Everywhere-Web/beweb/model.py +++ b/Bugs-Everywhere-Web/beweb/model.py @@ -2,12 +2,14 @@ from sqlobject import * from turbogears.database import PackageHub # Uncomment the following line if you wish to use Identity and SO_Provider from turbogears.identity.soprovider import TG_User, TG_Group, TG_Permission +from turbogears import identity hub = PackageHub("beweb") __connection__ = hub def people_map(): - return dict([(u.userId, u.displayName) for u in TG_User.select()]) + return dict([(u.userId, u.displayName) for u in TG_User.select() if + "fixbugs" in identity.current.permissions]) # class YourDataClass(SQLObject): # pass -- cgit