Skip to content

Commit 83c216f

Browse files
author
Richard Jones
committed
grant web access to admin ;)
1 parent e331f91 commit 83c216f

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

roundup/cgi_client.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
# $Id: cgi_client.py,v 1.159 2002-08-16 04:29:41 richard Exp $
18+
# $Id: cgi_client.py,v 1.160 2002-08-19 00:20:34 richard Exp $
1919

2020
__doc__ = """
2121
WWW request handler (also used in the stand-alone server).
@@ -41,8 +41,9 @@ def initialiseSecurity(security):
4141
'''
4242
security.addPermission(name="Web Registration",
4343
description="User may register through the web")
44-
security.addPermission(name="Web Access",
44+
p = security.addPermission(name="Web Access",
4545
description="User may access the web interface")
46+
security.addPermissionToRole('Admin', p)
4647

4748
# doing Role stuff through the web - make sure Admin can
4849
p = security.addPermission(name="Web Roles",
@@ -508,6 +509,7 @@ def list(self, sort=None, group=None, filter=None, columns=None,
508509
Default is all.
509510
510511
'''
512+
print 'list'
511513
cn = self.classname
512514
cl = self.db.classes[cn]
513515
if sort is None: sort = self.index_sort()
@@ -848,6 +850,7 @@ def _createnode(self):
848850
if files:
849851
props['files'] = files
850852
# create the node and return it's id
853+
print `props`
851854
return cl.create(**props)
852855

853856
def _handle_message(self):
@@ -1746,6 +1749,9 @@ def parsePropsFromForm(db, cl, form, nodeid=0, num_re=re.compile('^\d+$')):
17461749

17471750
#
17481751
# $Log: not supported by cvs2svn $
1752+
# Revision 1.159 2002/08/16 04:29:41 richard
1753+
# bugfix
1754+
#
17491755
# Revision 1.158 2002/08/15 00:40:10 richard
17501756
# cleanup
17511757
#

0 commit comments

Comments
 (0)