From 8b705ec4c3bd002bd853717295cae981a8035876 Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Thu, 8 May 2008 23:17:17 +0000 Subject: [PATCH] In send_invites(), no longer implicitly assuming rate plan 0 has notebook_collaboration set to False. --- NEWS | 4 ++++ controller/Users.py | 3 ++- controller/test/Test_controller.py | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index a34f8ee..e09d9ac 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,7 @@ +1.3.22: May 8, 2008 + * In send_invites(), no longer implicitly assuming rate plan 0 has + notebook_collaboration set to False. + 1.3.21: May 8, 2008 * Passing new yearly parameter to main page. diff --git a/controller/Users.py b/controller/Users.py index 4a490e4..7fca7c1 100644 --- a/controller/Users.py +++ b/controller/Users.py @@ -813,7 +813,8 @@ class Users( object ): # except for viewer-only invites, this feature requires a rate plan above basic user = self.__database.load( User, user_id ) - if user is None or user.username is None or ( user.rate_plan == 0 and access != u"viewer" ): + plan = self.__rate_plans[ user.rate_plan ] + if user is None or user.username is None or ( plan[ u"notebook_collaboration" ] != True and access != u"viewer" ): raise Access_error() if access == u"collaborator": diff --git a/controller/test/Test_controller.py b/controller/test/Test_controller.py index 7fc8ade..585186b 100644 --- a/controller/test/Test_controller.py +++ b/controller/test/Test_controller.py @@ -403,7 +403,7 @@ class Test_controller( object ): { u"name": u"super", u"storage_quota_bytes": 1337 * 10, - u"notebook_collaboration": True, + u"notebook_collaboration": False, u"fee": 1.99, u"yearly_fee": 19.90, u"button": u"[subscribe here user %s!] button",