Commit 0c546c99 authored by Jérome Perrin's avatar Jérome Perrin

Don't create user with global Auditor role, otherwise they can View all

preferences.
getActivePreference was not the correct method there


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23065 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 48454fc0
...@@ -46,11 +46,11 @@ class TestTemplate(ERP5TypeTestCase): ...@@ -46,11 +46,11 @@ class TestTemplate(ERP5TypeTestCase):
return ('erp5_base', 'erp5_ui_test') return ('erp5_base', 'erp5_ui_test')
def login(self, name=None): def login(self, name=None):
"""login with Auditor & Author roles.""" """login with Member & Author roles."""
if name is None: if name is None:
return return
uf = self.getPortal().acl_users uf = self.getPortal().acl_users
uf._doAddUser(name, '', ['Auditor', 'Author'], []) uf._doAddUser(name, '', ['Member', 'Author'], [])
user = uf.getUserById(name).__of__(uf) user = uf.getUserById(name).__of__(uf)
newSecurityManager(None, user) newSecurityManager(None, user)
...@@ -110,7 +110,7 @@ class TestTemplate(ERP5TypeTestCase): ...@@ -110,7 +110,7 @@ class TestTemplate(ERP5TypeTestCase):
def test_TemplateCreatePreference(self): def test_TemplateCreatePreference(self):
self.login('another user with no active preference') self.login('another user with no active preference')
active_user_preference_list = [p for p in active_user_preference_list = [p for p in
self.portal.portal_preferences.getActivePreference() self.portal.portal_preferences._getSortedPreferenceList()
if p.getPriority() == Priority.USER] if p.getPriority() == Priority.USER]
self.assertEquals([], active_user_preference_list) self.assertEquals([], active_user_preference_list)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment