Chris Johnston has proposed merging
lp:~chrisjohnston/loco-directory/bugfix-lp-610040 into lp:loco-directory.
Requested reviews:
loco-directory-dev (loco-directory-dev)
Related bugs:
#610040 Relax ACLs for local testing
https://bugs.launchpad.net/bugs/610040
Adds DEBUG_USER to allow for local testing.
--
https://code.launchpad.net/~chrisjohnston/loco-directory/bugfix-lp-610040/+merge/31346
Your team loco-directory-dev is requested to review the proposed merge of
lp:~chrisjohnston/loco-directory/bugfix-lp-610040 into lp:loco-directory.
=== modified file 'loco_directory/common/launchpad.py'
--- loco_directory/common/launchpad.py 2010-06-18 18:46:02 +0000
+++ loco_directory/common/launchpad.py 2010-07-30 02:02:41 +0000
@@ -21,12 +21,16 @@
return launchpad
def is_user_on_loco_council(user):
+ if user.is_authenticated() and settings.DEBUG and user.username == settings.DEBUG_USER:
+ return True
if not user.is_authenticated():
return False
lc_in_groups = user.groups.filter(name__exact='ubuntu-lococouncil')
return (lc_in_groups.count() == 1)
def is_team_member(user, team):
+ if user.is_authenticated() and settings.DEBUG and user.username == settings.DEBUG_USER:
+ return True
if not user.is_authenticated():
return False
user_in_groups = user.groups.filter(name__exact=team.lp_name)
=== modified file 'loco_directory/local_settings.py.sample'
--- loco_directory/local_settings.py.sample 2010-02-16 17:14:13 +0000
+++ loco_directory/local_settings.py.sample 2010-07-30 02:02:41 +0000
@@ -5,3 +5,4 @@
SECRET_KEY = ''
+DEBUG_USER = ''
=== modified file 'loco_directory/settings.py'
--- loco_directory/settings.py 2010-07-18 16:34:12 +0000
+++ loco_directory/settings.py 2010-07-30 02:02:41 +0000
@@ -11,6 +11,7 @@
PROJECT_PATH = os.path.dirname(os.path.abspath(__file__))
DEBUG = True
+DEBUG_USER = ''
TEMPLATE_DEBUG = DEBUG
STATIC_SERVE = True
_______________________________________________
Mailing list: https://launchpad.net/~loco-directory-dev
Post to : [email protected]
Unsubscribe : https://launchpad.net/~loco-directory-dev
More help : https://help.launchpad.net/ListHelp