r626 - in zope-groupuserfolder/branches/upstream/current: . debian
tests
Fabio Tranchitella
kobold at alioth.debian.org
Fri Feb 9 14:52:55 CET 2007
Author: kobold
Date: 2007-02-09 14:52:55 +0100 (Fri, 09 Feb 2007)
New Revision: 626
Added:
zope-groupuserfolder/branches/upstream/current/debian/
zope-groupuserfolder/branches/upstream/current/debian/changelog
zope-groupuserfolder/branches/upstream/current/debian/config
zope-groupuserfolder/branches/upstream/current/debian/control
zope-groupuserfolder/branches/upstream/current/debian/copyright
zope-groupuserfolder/branches/upstream/current/debian/postinst
zope-groupuserfolder/branches/upstream/current/debian/prerm
zope-groupuserfolder/branches/upstream/current/debian/rules
zope-groupuserfolder/branches/upstream/current/debian/templates
zope-groupuserfolder/branches/upstream/current/debian/watch
Modified:
zope-groupuserfolder/branches/upstream/current/CHANGES
zope-groupuserfolder/branches/upstream/current/GRUFUser.py
zope-groupuserfolder/branches/upstream/current/GroupUserFolder.py
zope-groupuserfolder/branches/upstream/current/GroupsTool.py
zope-groupuserfolder/branches/upstream/current/Log.py
zope-groupuserfolder/branches/upstream/current/global_symbols.py
zope-groupuserfolder/branches/upstream/current/tests/Log.py
zope-groupuserfolder/branches/upstream/current/tests/testGroupUserFolderAPI.py
zope-groupuserfolder/branches/upstream/current/tests/testLDAPGroupFolder.py
zope-groupuserfolder/branches/upstream/current/tests/testLDAPUserFolder.py
zope-groupuserfolder/branches/upstream/current/version.txt
Log:
[svn-upgrade] Integrating new upstream version, zope-groupuserfolder (3.54.1)
Modified: zope-groupuserfolder/branches/upstream/current/CHANGES
===================================================================
--- zope-groupuserfolder/branches/upstream/current/CHANGES 2007-02-09 13:51:14 UTC (rev 625)
+++ zope-groupuserfolder/branches/upstream/current/CHANGES 2007-02-09 13:52:55 UTC (rev 626)
@@ -1,3 +1,7 @@
+Unreleased
+ * Got rid of zLOG in favor of logging.
+ [stefan]
+
v3.54 - 2006-09-19
* Fix a bug with LDAPUserFolder where another UserFolder was returned when LUF
was requested [jvloothuis]
Modified: zope-groupuserfolder/branches/upstream/current/GRUFUser.py
===================================================================
--- zope-groupuserfolder/branches/upstream/current/GRUFUser.py 2007-02-09 13:51:14 UTC (rev 625)
+++ zope-groupuserfolder/branches/upstream/current/GRUFUser.py 2007-02-09 13:52:55 UTC (rev 626)
@@ -20,9 +20,11 @@
"""
__version__ = "$Revision: $"
# $Source: $
-# $Id: GRUFUser.py 30098 2006-09-08 12:35:01Z encolpe $
+# $Id: GRUFUser.py 34723 2006-12-15 11:25:30Z encolpe $
__docformat__ = 'restructuredtext'
+from copy import copy
+
# fakes a method from a DTML File
from Globals import MessageDialog, DTMLFile
@@ -797,12 +799,12 @@
def _getMemberIds(self, users = 1, groups = 1, transitive = 1, ):
"""
- Return the member ids (users and groups) of the atoms of this group.
- Transitiveness attribute is ignored with LDAP (no nested groups with
- LDAP anyway).
- This method now uses a shortcut to fetch members of an LDAP group
- (stored either within Zope or within your LDAP server)
- """
+ Return the member ids (users and groups) of the atoms of this group.
+ Transitiveness attribute is ignored with LDAP (no nested groups with
+ LDAP anyway).
+ This method now uses a shortcut to fetch members of an LDAP group
+ (stored either within Zope or within your LDAP server)
+ """
# Initial parameters.
# We fetch the users/groups list depending on what we search,
# and carefuly avoiding to use LDAP sources.
@@ -840,7 +842,10 @@
groupid = self.getId()
for src in ldap_sources:
groups = src.getGroups()
- grp = [ group for group in groups if group[0] == self.getId() ]
+ # With LDAPUserFolder >= 2.7 we need to add GROUP_PREFIX to group_name
+ # We keep backward compatibility
+ grp = [ group for group in groups if group[0] == self.getId() or \
+ GROUP_PREFIX + group[0] == self.getId()]
if not grp:
Log(LOG_DEBUG, "No such group ('%s') found." % (groupid,))
continue
@@ -875,13 +880,6 @@
gruf = self.aq_parent
return id in gruf.getMemberIds(self.getId())
- security.declarePrivate("setMembers")
- def setMembers(self, userids):
- """Set the members of the group
- """
- for userid in userids:
- self.aq_parent.userFolderAddGroup(userid, groupid)
-
security.declarePrivate("addMember")
def addMember(self, userid):
"""Add a user the the current group"""
@@ -915,6 +913,20 @@
gruf._updateUser(userid, groups = groups)
else:
raise ValueError, "User '%s' doesn't belong to group '%s'" % (userid, groupid, )
+
+ security.declarePrivate("setMembers")
+ def setMembers(self, userids):
+ """Set the members of the group
+ """
+ member_ids = self.getMemberIds()
+ all_ids = copy(member_ids)
+ all_ids.extend(userids)
+ groupid = self.getId()
+ for id in all_ids:
+ if id in member_ids and id not in userids:
+ self.removeMember(id)
+ elif id not in member_ids and id in userids:
+ self.addMember(id)
InitializeClass(GRUFUser)
Modified: zope-groupuserfolder/branches/upstream/current/GroupUserFolder.py
===================================================================
--- zope-groupuserfolder/branches/upstream/current/GroupUserFolder.py 2007-02-09 13:51:14 UTC (rev 625)
+++ zope-groupuserfolder/branches/upstream/current/GroupUserFolder.py 2007-02-09 13:52:55 UTC (rev 626)
@@ -20,7 +20,7 @@
"""
__version__ = "$Revision: $"
# $Source: $
-# $Id: GroupUserFolder.py 30517 2006-09-18 13:44:54Z manuco $
+# $Id: GroupUserFolder.py 34725 2006-12-15 12:27:06Z encolpe $
__docformat__ = 'restructuredtext'
@@ -1346,7 +1346,7 @@
"""
getGRUFVersion(self,) => Return human-readable GRUF version as a string.
"""
- rev_date = "$Date: 2006-09-18 15:44:54 +0200 (lun, 18 sep 2006) $"[7:-2]
+ rev_date = "$Date: 2006-12-15 13:27:06 +0100 (ven, 15 déc 2006) $"[7:-2]
return "%s / Revised %s" % (version__, rev_date)
@@ -2558,9 +2558,9 @@
if "acl_users" in us.objectIds():
us.manage_delObjects(['acl_users'])
-## # If we use ldap, tag it
-## if string.find(new_factory.lower(), "ldap") > -1:
-## self._haveLDAPUF += 1
+ ## If we use ldap, tag it
+ #if string.find(new_factory.lower(), "ldap") > -1:
+ # self._haveLDAPUF += 1
# Re-create the underlying UserFolder
# If we're called TTW, uses a redirect else tries to call the UF factory directly
Modified: zope-groupuserfolder/branches/upstream/current/GroupsTool.py
===================================================================
--- zope-groupuserfolder/branches/upstream/current/GroupsTool.py 2007-02-09 13:51:14 UTC (rev 625)
+++ zope-groupuserfolder/branches/upstream/current/GroupsTool.py 2007-02-09 13:52:55 UTC (rev 626)
@@ -24,7 +24,7 @@
"""
__version__ = "$Revision: $"
# $Source: $
-# $Id: GroupsTool.py 30098 2006-09-08 12:35:01Z encolpe $
+# $Id: GroupsTool.py 33400 2006-11-11 11:59:47Z shh42 $
__docformat__ = 'restructuredtext'
from Products.CMFCore.utils import UniqueObject
@@ -35,6 +35,7 @@
from Acquisition import aq_base
from AccessControl.User import nobody
from AccessControl import ClassSecurityInfo
+from ZODB.POSException import ConflictError
# BBB CMF < 1.5
try:
from Products.CMFCore.permissions import ManagePortal
@@ -478,16 +479,12 @@
#log("wrapping group %s" % g)
portal_group = gd.wrapGroup(g)
return portal_group
-
+ except ConflictError:
+ raise
except:
- from zLOG import LOG, ERROR
- import sys
- type,value,tb = sys.exc_info()
- try:
- LOG('GroupsTool', ERROR, 'Error during wrapGroup:', "\nType:%s\nValue:%s\n" % (type,value))
- finally:
- tb = None # Avoid leaking frame
- pass
+ import logging
+ logger = logging.getLogger('GroupUserFolder.GroupsTool')
+ logger.exception('Error during wrapGroup')
# Failed.
return g
Modified: zope-groupuserfolder/branches/upstream/current/Log.py
===================================================================
--- zope-groupuserfolder/branches/upstream/current/Log.py 2007-02-09 13:51:14 UTC (rev 625)
+++ zope-groupuserfolder/branches/upstream/current/Log.py 2007-02-09 13:52:55 UTC (rev 626)
@@ -37,7 +37,7 @@
"""
__version__ = "$Revision: $"
# $Source: $
-# $Id: Log.py 30098 2006-09-08 12:35:01Z encolpe $
+# $Id: Log.py 33389 2006-11-11 11:24:41Z shh42 $
__docformat__ = 'restructuredtext'
@@ -152,22 +152,26 @@
LOG_OUTPUT.flush()
-import zLOG
+import logging
+CUSTOM_TRACE = 5
+logging.addLevelName('TRACE', CUSTOM_TRACE)
+
zLogLevelConverter = {
- LOG_NONE: zLOG.TRACE,
- LOG_CRITICAL: zLOG.PANIC,
- LOG_ERROR: zLOG.ERROR,
- LOG_WARNING: zLOG.PROBLEM,
- LOG_NOTICE: zLOG.INFO,
- LOG_DEBUG: zLOG.DEBUG,
+ LOG_NONE: CUSTOM_TRACE,
+ LOG_CRITICAL: logging.CRITICAL,
+ LOG_ERROR: logging.ERROR,
+ LOG_WARNING: logging.WARNING,
+ LOG_NOTICE: logging.INFO,
+ LOG_DEBUG: logging.DEBUG,
}
def LogzLog(level, label, data, ):
"""
LogzLog : writes data though Zope's logging facility
"""
- zLOG.LOG("IngeniWeb", zLogLevelConverter[level], "", data + "\n", )
+ logger = logging.getLogger('GroupUserFolder')
+ logger.log(zLogLevelConverter[level], data + "\n", )
Added: zope-groupuserfolder/branches/upstream/current/debian/changelog
===================================================================
--- zope-groupuserfolder/branches/upstream/current/debian/changelog 2007-02-09 13:51:14 UTC (rev 625)
+++ zope-groupuserfolder/branches/upstream/current/debian/changelog 2007-02-09 13:52:55 UTC (rev 626)
@@ -0,0 +1,6 @@
+zope-groupuserfolder (0.3-1) unstable; urgency=low
+
+ * Initial Release.
+
+ -- Sylvain Thénault <sylvain.thenault at logilab.fr> Wed, 16 Apr 2003 10:04:50 +0200
+
Added: zope-groupuserfolder/branches/upstream/current/debian/config
===================================================================
--- zope-groupuserfolder/branches/upstream/current/debian/config 2007-02-09 13:51:14 UTC (rev 625)
+++ zope-groupuserfolder/branches/upstream/current/debian/config 2007-02-09 13:52:55 UTC (rev 626)
@@ -0,0 +1,22 @@
+#!/bin/sh -e
+#----------------------------------------------------------------
+# Simple `.config' script for zope-* packages.
+# First coded by Luca - De Whiskey's - De Vitis <luca at debian.org>
+#----------------------------------------------------------------
+
+# Load the confmodule.
+. /usr/share/debconf/confmodule
+
+# Setup.
+db_version 2.0
+db_capb backup
+
+# Prompt the question to the user.
+db_input low "$(basename $0 .config)/postinst" || true
+db_go
+
+# Stop the communication with the db.
+db_stop
+
+# That's all folks!
+exit 0
Added: zope-groupuserfolder/branches/upstream/current/debian/control
===================================================================
--- zope-groupuserfolder/branches/upstream/current/debian/control 2007-02-09 13:51:14 UTC (rev 625)
+++ zope-groupuserfolder/branches/upstream/current/debian/control 2007-02-09 13:52:55 UTC (rev 626)
@@ -0,0 +1,22 @@
+Source: zope-groupuserfolder
+Section: web
+Priority: optional
+Maintainer: Sylvain Thenault <sylvain.thenault at logilab.fr>
+Build-Depends: debhelper (>= 3.0.0)
+Standards-Version: 3.5.8
+
+Package: zope-groupuserfolder
+Architecture: all
+Depends: zope
+Description: Group management for Zope [dummy package]
+ GroupUserFolder is a kind of user folder that provides a special kind of user
+ management.
+ Some users are "flagged" as GROUP and then normal users will be able to belong
+ to one or
+ serveral groups.
+ .
+ .
+ This package is an empty dummy package that always depends on
+ a package built for Debian's default Python version.
+
+
Added: zope-groupuserfolder/branches/upstream/current/debian/copyright
===================================================================
--- zope-groupuserfolder/branches/upstream/current/debian/copyright 2007-02-09 13:51:14 UTC (rev 625)
+++ zope-groupuserfolder/branches/upstream/current/debian/copyright 2007-02-09 13:52:55 UTC (rev 626)
@@ -0,0 +1,18 @@
+This package was debianized by Sylvain Thenault <sylvain.thenault at logilab.fr> Sat, 13 Apr 2002 19:05:23 +0200.
+
+It was downloaded from ftp://ftp.sourceforge.net/pub/sourceforge/collective
+
+Upstream Author:
+
+ P.-J. Grizel <grizel at ingeniweb.com>
+
+Copyright:
+
+Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
+Copyright (c) 2002 Ingeniweb SARL
+
+
+This software is distributed under the term of the Zope Public License version 2.0.
+Please, refer to /usr/share/doc/zope/ZPL-2.0
+
+
Added: zope-groupuserfolder/branches/upstream/current/debian/postinst
===================================================================
--- zope-groupuserfolder/branches/upstream/current/debian/postinst 2007-02-09 13:51:14 UTC (rev 625)
+++ zope-groupuserfolder/branches/upstream/current/debian/postinst 2007-02-09 13:52:55 UTC (rev 626)
@@ -0,0 +1,50 @@
+#! /bin/sh
+#----------------------------------------------------------------
+# Simple `.postinst' script for zope-* packages.
+# First coded by Luca - De Whiskey's - De Vitis <luca at debian.org>
+#----------------------------------------------------------------
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see /usr/doc/packaging-manual/
+#
+# quoting from the policy:
+# Any necessary prompting should almost always be confined to the
+# post-installation script, and should be protected with a conditional
+# so that unnecessary prompting doesn't happen if a package's
+# installation fails and the `postinst' is called with `abort-upgrade',
+# `abort-remove' or `abort-deconfigure'.
+
+# Load confmodule.
+. /usr/share/debconf/confmodule
+db_version 2.0
+
+case "$1" in
+ configure)
+ # Get the answer.
+ db_get "$(basename $0 .postinst)/postinst" || true
+ test "$RET" = "true" && /etc/init.d/zope restart
+ ;;
+ abort-upgrade|abort-remove|abort-deconfigure)
+ ;;
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 0
+ ;;
+esac
+
+# Stop the communication with the db.
+db_stop
+
+#DEBHELPER#
+
+# That's all folks!
+exit 0
Added: zope-groupuserfolder/branches/upstream/current/debian/prerm
===================================================================
--- zope-groupuserfolder/branches/upstream/current/debian/prerm 2007-02-09 13:51:14 UTC (rev 625)
+++ zope-groupuserfolder/branches/upstream/current/debian/prerm 2007-02-09 13:52:55 UTC (rev 626)
@@ -0,0 +1,40 @@
+#! /bin/sh
+#----------------------------------------------------------------
+# Simple `.prerm' script for zope-* packages.
+# First coded by Luca - De Whiskey's - De Vitis <luca at debian.org>
+#----------------------------------------------------------------
+
+set -e
+
+# summary of how this script can be called:
+# * <prerm> `remove'
+# * <old-prerm> `upgrade' <new-version>
+# * <new-prerm> `failed-upgrade' <old-version>
+# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
+# * <deconfigured's-prerm> `deconfigure' `in-favour'
+# <package-being-installed> <version> `removing'
+# <conflicting-package> <version>
+# for details, see /usr/share/doc/packaging-manual/
+
+# I simply replaced the PACKAGE variable with the subscript
+dpkg --listfiles $(basename $0 .prerm) |
+ awk '$0~/\.py$/ {print $0"c\n" $0"o"}' |
+ xargs rm -f >&2
+
+case "$1" in
+ remove|upgrade|deconfigure)
+ ;;
+ failed-upgrade)
+ ;;
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 0
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: zope-groupuserfolder/branches/upstream/current/debian/rules
===================================================================
--- zope-groupuserfolder/branches/upstream/current/debian/rules 2007-02-09 13:51:14 UTC (rev 625)
+++ zope-groupuserfolder/branches/upstream/current/debian/rules 2007-02-09 13:52:55 UTC (rev 626)
@@ -0,0 +1,89 @@
+#!/usr/bin/make -f
+# Sample debian/rules that uses debhelper.
+# GNU copyright 1997 to 1999 by Joey Hess.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+# This is the debhelper compatability version to use.
+export DH_COMPAT=4
+
+
+
+build: DH_OPTIONS=
+build: build-stamp
+build-stamp:
+ dh_testdir
+
+ touch build-stamp
+
+clean:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+ rm -rf build
+ rm -rf debian/python?.?-tmp*
+ dh_clean
+
+install: DH_OPTIONS=
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+
+ find . -type f -not \( -path '*/debian/*' -or -name 'build-stamp' -or -name 'LICENSE.txt' -or -name '.cvsignore' \) -exec install -D --mode=644 {} debian/zope-groupuserfolder/usr/lib/zope/lib/python/Products/GroupUserFolder/{} \;
+
+
+
+
+
+# Build architecture-independent files here.
+binary-indep: DH_OPTIONS=-i
+binary-indep: build install
+ dh_testdir
+ dh_testroot
+ dh_install
+
+
+
+
+ gzip -9 -c ChangeLog > changelog.gz
+ dh_installdocs -A TODO changelog.gz
+ dh_installchangelogs
+
+ dh_link
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+# Build architecture-dependent files here.
+binary-arch: DH_OPTIONS=-a
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_install
+
+
+
+
+ gzip -9 -c ChangeLog > changelog.gz
+ dh_installdocs -A TODO changelog.gz
+ dh_installchangelogs
+
+ dh_strip
+ dh_link
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+binary: binary-indep
+.PHONY: build clean binary-arch binary-indep binary
+
Property changes on: zope-groupuserfolder/branches/upstream/current/debian/rules
___________________________________________________________________
Name: svn:executable
+ *
Added: zope-groupuserfolder/branches/upstream/current/debian/templates
===================================================================
--- zope-groupuserfolder/branches/upstream/current/debian/templates 2007-02-09 13:51:14 UTC (rev 625)
+++ zope-groupuserfolder/branches/upstream/current/debian/templates 2007-02-09 13:52:55 UTC (rev 626)
@@ -0,0 +1,7 @@
+Template: zope-cmfforum/postinst
+Type: boolean
+Default: true
+Description: Do you want me to restart Zope?
+ To let this product/feature work properly, you need to restart Zope. If
+ you want, I may restart Zope automatically, else you should do it your
+ self.
Added: zope-groupuserfolder/branches/upstream/current/debian/watch
===================================================================
--- zope-groupuserfolder/branches/upstream/current/debian/watch 2007-02-09 13:51:14 UTC (rev 625)
+++ zope-groupuserfolder/branches/upstream/current/debian/watch 2007-02-09 13:52:55 UTC (rev 626)
@@ -0,0 +1,5 @@
+# Example watch control file for uscan
+# Rename this file to "watch" and then you can run the "uscan" command
+# to check for upstream updates and more.
+# Site Directory Pattern Version Script
+ftp.sourceforge.net /pub/sourceforge/collective GroupUserFolder-(.*)\.tar\.gz debian uupdate
Modified: zope-groupuserfolder/branches/upstream/current/global_symbols.py
===================================================================
--- zope-groupuserfolder/branches/upstream/current/global_symbols.py 2007-02-09 13:51:14 UTC (rev 625)
+++ zope-groupuserfolder/branches/upstream/current/global_symbols.py 2007-02-09 13:52:55 UTC (rev 626)
@@ -20,7 +20,7 @@
"""
__version__ = "$Revision: $"
# $Source: $
-# $Id: global_symbols.py 30098 2006-09-08 12:35:01Z encolpe $
+# $Id: global_symbols.py 32384 2006-10-27 10:00:55Z encolpe $
__docformat__ = 'restructuredtext'
import os
@@ -28,7 +28,7 @@
# Check if we have to be in debug mode
import Log
-if os.path.isfile(os.path.abspath(os.path.dirname(__file__)) + '/debug.txt'):
+if os.path.isfile(os.path.join(os.path.abspath(os.path.dirname(__file__)), 'debug.txt')):
Log.LOG_LEVEL = Log.LOG_DEBUG
DEBUG_MODE = 1
else:
@@ -38,8 +38,8 @@
from Log import *
# Retreive version
-if os.path.isfile(os.path.abspath(os.path.dirname(__file__)) + '/version.txt'):
- __version_file_ = open(os.path.abspath(os.path.dirname(__file__)) + '/version.txt', 'r', )
+if os.path.isfile(os.path.join(os.path.abspath(os.path.dirname(__file__)), 'version.txt')):
+ __version_file_ = open(os.path.join(os.path.abspath(os.path.dirname(__file__)), 'version.txt'), 'r', )
version__ = __version_file_.read()[:-1]
__version_file_.close()
else:
Modified: zope-groupuserfolder/branches/upstream/current/tests/Log.py
===================================================================
--- zope-groupuserfolder/branches/upstream/current/tests/Log.py 2007-02-09 13:51:14 UTC (rev 625)
+++ zope-groupuserfolder/branches/upstream/current/tests/Log.py 2007-02-09 13:52:55 UTC (rev 626)
@@ -37,7 +37,7 @@
"""
__version__ = "$Revision: $"
# $Source: $
-# $Id: Log.py 30098 2006-09-08 12:35:01Z encolpe $
+# $Id: Log.py 33402 2006-11-11 12:26:18Z shh42 $
__docformat__ = 'restructuredtext'
@@ -151,25 +151,28 @@
LOG_OUTPUT.write(data+'\n')
LOG_OUTPUT.flush()
-
logFile = LogFile
-import zLOG
+import logging
+CUSTOM_TRACE = 5
+logging.addLevelName('TRACE', CUSTOM_TRACE)
+
zLogLevelConverter = {
- LOG_NONE: zLOG.TRACE,
- LOG_CRITICAL: zLOG.PANIC,
- LOG_ERROR: zLOG.ERROR,
- LOG_WARNING: zLOG.PROBLEM,
- LOG_NOTICE: zLOG.INFO,
- LOG_DEBUG: zLOG.DEBUG,
+ LOG_NONE: CUSTOM_TRACE,
+ LOG_CRITICAL: logging.CRITICAL,
+ LOG_ERROR: logging.ERROR,
+ LOG_WARNING: logging.WARNING,
+ LOG_NOTICE: logging.INFO,
+ LOG_DEBUG: logging.DEBUG,
}
def LogzLog(level, label, data, ):
"""
LogzLog : writes data though Zope's logging facility
"""
- zLOG.LOG("IngeniWeb", zLogLevelConverter[level], "", data + "\n", )
+ logger = logging.getLogger('GroupUserFolder')
+ logger.log(zLogLevelConverter[level], data + "\n", )
Modified: zope-groupuserfolder/branches/upstream/current/tests/testGroupUserFolderAPI.py
===================================================================
--- zope-groupuserfolder/branches/upstream/current/tests/testGroupUserFolderAPI.py 2007-02-09 13:51:14 UTC (rev 625)
+++ zope-groupuserfolder/branches/upstream/current/tests/testGroupUserFolderAPI.py 2007-02-09 13:52:55 UTC (rev 626)
@@ -20,7 +20,7 @@
"""
__version__ = "$Revision: $"
# $Source: $
-# $Id: testGroupUserFolderAPI.py 30098 2006-09-08 12:35:01Z encolpe $
+# $Id: testGroupUserFolderAPI.py 34723 2006-12-15 11:25:30Z encolpe $
__docformat__ = 'restructuredtext'
import os, sys
@@ -771,9 +771,6 @@
)
# Groups support
- def test_setMembers(self):
- """Set the members of the group
- """
def test_getMemberIds(self,):
should_be = [
@@ -829,13 +826,29 @@
def test_removeMember(self):
"""Remove a member from a group
- """
+ """
self.failUnless("u1" not in self.gruf.getMemberIds("ng3"))
self.gruf.addMember("ng3", "u1")
self.failUnless("u1" in self.gruf.getMemberIds("ng3"))
self.gruf.removeMember("ng3", "u1")
self.failUnless("u1" not in self.gruf.getMemberIds("ng3"))
+ def test_setMembers(self):
+ """Set the members of the group
+ """
+ member_ids = self.gruf.getMemberIds("ng3")
+ self.gruf.addMember("ng3", "u1")
+ self.gruf.addMember("ng3", "u2")
+ self.failIf("u1" not in self.gruf.getMemberIds("ng3"))
+ self.failIf("u2" not in self.gruf.getMemberIds("ng3"))
+ self.failIf("u3" in self.gruf.getMemberIds("ng3"))
+
+ self.gruf.setMembers("ng3", (member_ids + ["u2", "u3"]))
+
+ self.failIf("u1" in self.gruf.getMemberIds("ng3"))
+ self.failIf("u2" not in self.gruf.getMemberIds("ng3"))
+ self.failIf("u3" not in self.gruf.getMemberIds("ng3"))
+
def test_hasMember(self,):
self.failUnless(not self.gruf.hasMember("ng3", "u1"))
self.failUnless(not self.gruf.hasMember("group_ng3", "u1"))
Modified: zope-groupuserfolder/branches/upstream/current/tests/testLDAPGroupFolder.py
===================================================================
--- zope-groupuserfolder/branches/upstream/current/tests/testLDAPGroupFolder.py 2007-02-09 13:51:14 UTC (rev 625)
+++ zope-groupuserfolder/branches/upstream/current/tests/testLDAPGroupFolder.py 2007-02-09 13:52:55 UTC (rev 626)
@@ -20,7 +20,7 @@
"""
__version__ = "$Revision: $"
# $Source: $
-# $Id: testLDAPGroupFolder.py 30098 2006-09-08 12:35:01Z encolpe $
+# $Id: testLDAPGroupFolder.py 34725 2006-12-15 12:27:06Z encolpe $
__docformat__ = 'restructuredtext'
import os, sys
@@ -122,23 +122,6 @@
# User source replacement
self.gruf.replaceUserSource("Users",
"manage_addProduct/LDAPUserFolder/manage_addLDAPUserFolder",
- title = dg('title'),
- LDAP_server = dg('server'),
- login_attr = dg('login_attr'),
- uid_attr = dg('uid_attr'),
- users_base = dg('users_base'),
- users_scope = dg('users_scope'),
- roles= dg('roles'),
- groups_base = dg('groups_base'),
- groups_scope = dg('groups_scope'),
- binduid = dg('binduid'),
- bindpwd = dg('bindpwd'),
- binduid_usage = dg('binduid_usage'),
- rdn_attr = dg('rdn_attr'),
- local_groups = dg('local_groups'),
- encryption = dg('encryption'),
- use_ssl = dg('use_ssl'),
- read_only=dg('read_only'),
)
self.gruf.replaceUserSource(
"Groups",
@@ -150,6 +133,7 @@
# Edit LDAPUF 'cause objectClass cannot be set otherwise :(
self.gruf.Users.acl_users.manage_edit(
title = dg('title'),
+ #LDAP_server = dg('server'),
login_attr = dg('login_attr'),
uid_attr = dg('uid_attr'),
users_base = dg('users_base'),
@@ -162,9 +146,10 @@
bindpwd = dg('bindpwd'),
binduid_usage = dg('binduid_usage'),
rdn_attr = dg('rdn_attr'),
- local_groups = 0,
+ local_groups = dg('local_groups'),
encryption = dg('encryption'),
- read_only=dg('read_only'),
+ #use_ssl = dg('use_ssl'),
+ #read_only=dg('read_only'),
)
self.delete_created_users()
Modified: zope-groupuserfolder/branches/upstream/current/tests/testLDAPUserFolder.py
===================================================================
--- zope-groupuserfolder/branches/upstream/current/tests/testLDAPUserFolder.py 2007-02-09 13:51:14 UTC (rev 625)
+++ zope-groupuserfolder/branches/upstream/current/tests/testLDAPUserFolder.py 2007-02-09 13:52:55 UTC (rev 626)
@@ -20,7 +20,7 @@
"""
__version__ = "$Revision: $"
# $Source: $
-# $Id: testLDAPUserFolder.py 30098 2006-09-08 12:35:01Z encolpe $
+# $Id: testLDAPUserFolder.py 34725 2006-12-15 12:27:06Z encolpe $
__docformat__ = 'restructuredtext'
import os, sys
@@ -116,23 +116,23 @@
# User source replacement
self.gruf.replaceUserSource("Users",
"manage_addProduct/LDAPUserFolder/manage_addLDAPUserFolder",
- title = dg('title'),
- LDAP_server = dg('server'),
- login_attr = dg('login_attr'),
- uid_attr = dg('uid_attr'),
- users_base = dg('users_base'),
- users_scope = dg('users_scope'),
- roles= dg('roles'),
- groups_base = dg('groups_base'),
- groups_scope = dg('groups_scope'),
- binduid = dg('binduid'),
- bindpwd = dg('bindpwd'),
- binduid_usage = dg('binduid_usage'),
- rdn_attr = dg('rdn_attr'),
- local_groups = dg('local_groups'),
- encryption = dg('encryption'),
- use_ssl = dg('use_ssl'),
- read_only=dg('read_only'),
+ #title = dg('title'),
+ #LDAP_server = dg('server'),
+ #login_attr = dg('login_attr'),
+ #uid_attr = dg('uid_attr'),
+ #users_base = dg('users_base'),
+ #users_scope = dg('users_scope'),
+ #roles= dg('roles'),
+ #groups_base = dg('groups_base'),
+ #groups_scope = dg('groups_scope'),
+ #binduid = dg('binduid'),
+ #bindpwd = dg('bindpwd'),
+ #binduid_usage = dg('binduid_usage'),
+ #rdn_attr = dg('rdn_attr'),
+ #local_groups = dg('local_groups'),
+ #encryption = dg('encryption'),
+ #use_ssl = dg('use_ssl'),
+ #read_only=dg('read_only'),
)
# Edit LDAPUF 'cause objectClass cannot be set otherwise :(
Modified: zope-groupuserfolder/branches/upstream/current/version.txt
===================================================================
--- zope-groupuserfolder/branches/upstream/current/version.txt 2007-02-09 13:51:14 UTC (rev 625)
+++ zope-groupuserfolder/branches/upstream/current/version.txt 2007-02-09 13:52:55 UTC (rev 626)
@@ -1 +1 @@
-3.54
\ No newline at end of file
+3.54.1
More information about the pkg-zope-commits
mailing list