Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
2d7e5050
Commit
2d7e5050
authored
Jan 10, 2011
by
Maurits van Rees
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Report success or failure (when known) of creating a new user with the addzope2user script.
parent
765d68a8
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
23 additions
and
13 deletions
+23
-13
doc/CHANGES.rst
doc/CHANGES.rst
+3
-0
src/Products/Five/browser/tests/pages.txt
src/Products/Five/browser/tests/pages.txt
+1
-1
src/Products/Five/browser/tests/pages_ftest.txt
src/Products/Five/browser/tests/pages_ftest.txt
+2
-2
src/Products/Five/browser/tests/resource_ftest.txt
src/Products/Five/browser/tests/resource_ftest.txt
+1
-1
src/Products/Five/browser/tests/test_defaultview.py
src/Products/Five/browser/tests/test_defaultview.py
+1
-1
src/Products/Five/browser/tests/test_menu.py
src/Products/Five/browser/tests/test_menu.py
+1
-1
src/Products/Five/browser/tests/test_scriptsecurity.py
src/Products/Five/browser/tests/test_scriptsecurity.py
+2
-2
src/Products/Five/component/makesite.txt
src/Products/Five/component/makesite.txt
+1
-1
src/Products/Five/skin/tests/test_standardmacros.py
src/Products/Five/skin/tests/test_standardmacros.py
+1
-1
src/Products/Five/viewlet/directives.txt
src/Products/Five/viewlet/directives.txt
+1
-1
src/Zope2/Startup/zopectl.py
src/Zope2/Startup/zopectl.py
+2
-1
src/Zope2/utilities/adduser.py
src/Zope2/utilities/adduser.py
+7
-1
No files found.
doc/CHANGES.rst
View file @
2d7e5050
...
...
@@ -23,6 +23,9 @@ Bugs Fixed
Features Added
++++++++++++++
- Report success or failure (when known) of creating a new user with
the addzope2user script.
- Moved subset id calculation in `OFS.OrderSupport.moveObjectsByDelta` to a
new helper method, patch by Tom Gross.
...
...
src/Products/Five/browser/tests/pages.txt
View file @
2d7e5050
...
...
@@ -17,7 +17,7 @@ We also need to create a stub user account and login; otherwise we
wouldn't have all the rights to do traversal etc.:
>>> uf = self.folder.acl_users
>>> uf._doAddUser('manager', 'r00t', ['Manager'], [])
>>>
_ignored =
uf._doAddUser('manager', 'r00t', ['Manager'], [])
>>> self.login('manager')
Now for some actual testing...
...
...
src/Products/Five/browser/tests/pages_ftest.txt
View file @
2d7e5050
...
...
@@ -55,8 +55,8 @@ Browser pages need to be protected with a permission. Let's test
those; we start by adding two users:
>>> uf = self.folder.acl_users
>>> uf._doAddUser('viewer', 'secret', [], [])
>>> uf._doAddUser('manager', 'r00t', ['Manager'], [])
>>>
_ignored =
uf._doAddUser('viewer', 'secret', [], [])
>>>
_ignored =
uf._doAddUser('manager', 'r00t', ['Manager'], [])
>>> protected_view_names = [
... 'eagle.txt', 'falcon.html', 'owl.html', 'flamingo.html',
...
...
src/Products/Five/browser/tests/resource_ftest.txt
View file @
2d7e5050
...
...
@@ -20,7 +20,7 @@ Set up the test fixtures:
... glob.glob('%s/*.css' % _prefix))]
>>> uf = self.folder.acl_users
>>> uf._doAddUser('manager', 'r00t', ['Manager'], [])
>>>
_ignored =
uf._doAddUser('manager', 'r00t', ['Manager'], [])
Image resource
...
...
src/Products/Five/browser/tests/test_defaultview.py
View file @
2d7e5050
...
...
@@ -39,7 +39,7 @@ def test_default_view():
As a last act of preparation, we create a manager login:
>>> uf = self.folder.acl_users
>>> uf._doAddUser('manager', 'r00t', ['Manager'], [])
>>>
_ignored =
uf._doAddUser('manager', 'r00t', ['Manager'], [])
We can specify another default view with browser:defaultView:
...
...
src/Products/Five/browser/tests/test_menu.py
View file @
2d7e5050
...
...
@@ -87,7 +87,7 @@ def test_menu():
Let's create a manager user account and log in.
>>> uf = self.folder.acl_users
>>> uf._doAddUser('manager', 'r00t', ['Manager'], [])
>>>
_ignored =
uf._doAddUser('manager', 'r00t', ['Manager'], [])
>>> self.login('manager')
>>> newInteraction()
...
...
src/Products/Five/browser/tests/test_scriptsecurity.py
View file @
2d7e5050
...
...
@@ -74,7 +74,7 @@ def test_resource_restricted_code():
Now let's create a manager user account and log in:
>>> uf = self.folder.acl_users
>>> uf._doAddUser('manager', 'r00t', ['Manager'], [])
>>>
_ignored =
uf._doAddUser('manager', 'r00t', ['Manager'], [])
>>> self.login('manager')
We can now view them all:
...
...
@@ -122,7 +122,7 @@ def test_view_restricted_code():
wouldn't have all the rights to do traversal etc.:
>>> uf = self.folder.acl_users
>>> uf._doAddUser('manager', 'r00t', ['Manager'], [])
>>>
_ignored =
uf._doAddUser('manager', 'r00t', ['Manager'], [])
>>> self.login('manager')
>>> protected_view_names = [
...
...
src/Products/Five/component/makesite.txt
View file @
2d7e5050
...
...
@@ -26,7 +26,7 @@ Making a site
-------------
>>> uf = app.acl_users
>>> uf._doAddUser('manager', 'r00t', ['Manager'], [])
>>>
_ignored =
uf._doAddUser('manager', 'r00t', ['Manager'], [])
Create the test browser we'll be using:
...
...
src/Products/Five/skin/tests/test_standardmacros.py
View file @
2d7e5050
...
...
@@ -18,7 +18,7 @@ def test_standard_macros():
"""Test standard macros
>>> uf = self.folder.acl_users
>>> uf._doAddUser('manager', 'r00t', ['Manager'], [])
>>>
_ignored =
uf._doAddUser('manager', 'r00t', ['Manager'], [])
>>> self.login('manager')
>>> from Products.Five.tests.testing import manage_addFiveTraversableFolder
...
...
src/Products/Five/viewlet/directives.txt
View file @
2d7e5050
...
...
@@ -379,7 +379,7 @@ Before we can begin, we need to set up a few things. We need a
manager account:
>>> uf = self.folder.acl_users
>>> uf._doAddUser('manager', 'r00t', ['Manager'], [])
>>>
_ignored =
uf._doAddUser('manager', 'r00t', ['Manager'], [])
Finally, we need to setup a traversable folder. Otherwise, Five won't
get do its view lookup magic:
...
...
src/Zope2/Startup/zopectl.py
View file @
2d7e5050
...
...
@@ -420,9 +420,10 @@ class ZopeCmd(ZDCmd):
self
.
options
.
python
,
'import Zope2; '
'app = Zope2.app(); '
'app.acl_users._doAddUser(
\
'
%s
\
'
,
\
'
%s
\
'
, [
\
'
Manager
\
'
], []); '
'
result =
app.acl_users._doAddUser(
\
'
%s
\
'
,
\
'
%s
\
'
, [
\
'
Manager
\
'
], []); '
'import transaction; '
'transaction.commit(); '
'print
\
'
Created user:
\
'
, result'
)
%
(
name
,
password
)
os
.
system
(
cmdline
)
...
...
src/Zope2/utilities/adduser.py
View file @
2d7e5050
...
...
@@ -33,7 +33,13 @@ def main(argv=sys.argv):
finder
=
ZopeFinder
(
argv
)
finder
.
filter_warnings
()
app
=
finder
.
get_app
()
adduser
(
app
,
user
,
pwd
)
result
=
adduser
(
app
,
user
,
pwd
)
if
result
:
print
"User %s created."
%
user
else
:
print
"Got no result back. User creation may have failed."
print
"Maybe the user already exists and nothing is done then."
print
"Or the implementation does not give info when it succeeds."
if
__name__
==
'__main__'
:
main
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment