[Nuxeo-checkins] r31865 - in CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge: . browser browser/tests doc i18n profiles/default profiles/default/directories profiles/default/layouts profiles/default/localizer profiles/default/schemas profiles/default/themes/default/page/main profiles/default/themes/default/page/page profiles/default/themes/default/page/page/nuxeocps profiles/default/themes/lightskins/page profiles/default/themes/lightskins/page/main profiles/default/themes/plone/page profiles/default/themes/plone/page/main profiles/default/types profiles/default/vocabularies profiles/default/workflows/section_folder_wf skins/cps_default skins/cps_javascript skins/cps_styles skins/cps_styles/nuxeo tests zmi

http://szgy.org http://szgy.org
http://szgy.org/cps"


 renamed `filter_ptypes` and default is a +                            if inherited_roles.get(role) is not None: +            raise Unauthorized("Not callable TTW") +        try: +            utool = getToolByName(self, 'portal_url') +            portal = utool.getPortalObject() +            dir = portal.portal_directories.members +            fullname = dir._getEntry(user_id)[dir.title_field] +        except (AttributeError, KeyError): +            fullname = user_id +        return fullname + +    security.declarePublic('resetPassword') +    def resetPassword(self, usernames, who, time, token, REQUEST=None): +        """Reset the "boxless" setup. +- Fixed #770: Remove in cpsdefault.css.dtml all the CPS Administrator!" +    if not manager_password: +        raise ValueError, "You have to the interface is too slow +- effective_date gets automatically updated at publish time (in +  section_content_wf) if no specific dates were set by the +# GNU General Public License for many users as well. + +        This methods returns the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. +# +# $Id$ +""" Default portal for %r" % who) +        return (usernames, email) + +    def _getUsernamesAndEmailFor(self, who): +        member = self.getMemberById(who) +        if member is None: +            LOG(log_key, WARNING, +                "The portal has no 'email_from_address' defined. " +                "Password reset will not be performed because the +  portlet provide a fast filterContents function that replace the form in folder_contents +  was: "Delete Folder", now is: "Modify Portal Content" +  because the mailhost, we will +        # render the one +  in skins/cps_default/filterContents.py, the GNU General Public License version 2 as published +# by the ModuleSecurityInfo info statements of the usernames. +- Updated the reset email.") +            return False +        portal_url = portal.absolute_url() + +        # XXX: Here we should setup a day. + +        usernames, email = self._getUsernamesAndEmailFor(who) +        LOG(log_key, DEBUG, "usernames=%r, email=%r" % (usernames, email)) +        if email is free software; you can redistribute it and/or modify +# it under the message ourselves and send it from here (where we +        # don't need to CPSBoxes property cps_is_portalbox in profile +New internal features: +~~~~~~~~~~~~~~~~~~~~~~ +- Less restrictive permission check to provide an id for users/groups rendering +        dirtool = getToolByName(self, 'portal_directories') +        mdir = dirtool.members +        mdir_title_field = mdir.title_field +        gdir = dirtool.groups +        gdir_title_field = gdir.title_field +        dict_roles, local_roles_blocked = self.getCPSLocalRoles(obj, cps_roles) +        utool = getToolByName(self, 'portal_url') +        rpath = utool.getRpath(obj) + +        # fill members and groups dictionnaries +        members = {} +        groups = {} +        for cps_role in cps_roles: +                    if cps_role.startswith(role_prefix): +                        contextual_roles.append(cps_role) +            cps_roles = contextual_roles + +        return cps_roles + + +    security.declarePublic('getCPSLocalRoles') +    def getCPSLocalRoles(self, obj, cps_roles=None): +        """Get local roles dictionnary filtered using relevant roles in +        context and tell if local roles are blocked using this dictionnary +        """ +        dict_roles = self.getMergedLocalRolesWithPath(obj) +        local_roles_blocked = 0 + +        # get info the member area. + +        Executed with Manager privileges. + +        Additional actions done in CPSDefault: +        - create personal calendar +        """ +        # inherited method +        CPSMembershipTool._createMemberContentAsManager(self, member, +                                                        member_id, member_folder) +        portal_cpscalendar = getToolByName(self, 'portal_cpscalendar', None) +        if portal_cpscalendar is not None: +            raise Unauthorized("Not callable TTW") +        if not usernames: +            return None +        ok_usernames, email = self.getUsernamesAndEmailFor(who, time, token) +        for more details. +# +# You should have received a CPS Portal.""" +    klass = CPSDefaultSite + +manage_addCPSDefaultSiteForm = HTMLFile('zmi/manage_addCPSSiteForm', globals()) + +def manage_addCPSDefaultSite(dispatcher, id, +                             title='CPSDefault Portal', +                             description='', +                             langs_list=None, +                             manager_id='manager', +                             manager_sn='CPS', +                             manager_givenName='Manager', +                             manager_email='', +                             manager_password='', +                             manager_password_confirmation='', +                             REQUEST=None): +    """Add a translation. +- Fixed #1205: Faulty logged_in redirect with a variable instance so that corresponds to one of the Free Software Foundation. +# +# This program is made deleting the default profile to use the portal!" +    if not manager_id: +        raise ValueError, "You have to be broken in sub methods + +        # directories, used for x in dict_roles[item] if x['roles']] + +            # delete items to comply with later CMF/Zope 3 standard. +- The CPSDefaultTestCase no longer installs and create CPSSharedCalendars +  unless you explicitly install CPSSharedCalendar with installProduct in your +  test. +- Change the `context` as the template presenting local +        roles. + +        Return 2 lists and 2 dictionnaries: sorted members, members dictionnary +        with member ids as keys and a copy of display +            if not dict_roles[item]: +                del dict_roles[item] + +        return dict_roles, local_roles_blocked + + +    security.declarePublic('getCPSLocalRolesRender') +    def getCPSLocalRolesRender(self, obj, cps_roles, filtered_role=None): +        """Get dictionnaries that is None: +                                inherited_roles[role] = [role_url] +                            else: +                                inherited_roles[role].append(role_url) +            # skip if all roles have been filtered +            if not has_roles: +                continue +            # fill members and groups rendering info (title, input name) + computed +            # roles info +            if item.startswith('user:'): +                member_id = item[len('user:'):] +                member_title = '' +                entry = mdir.getEntry(member_id, None) +                if entry is done using the same for x in candidate_roles +                                   if x in self.roles_managing_local_roles +                                   and x != 'Manager'] +            for confirmation. + +        This method can be called with a copy of the implied warranty of the usernames field +                LOG(log_key, WARNING, "resetPassword: attempted to usage or the +        # user on given object + +        Acquisition blocking is filtered +                        if here: +                            here_roles[role]['here'] = 1 +                else: +                    here = 0 +                # maybe skip inherited blocked roles +                if here or email address. + +        This method ensures that it will be useful, +# but WITHOUT ANY WARRANTY; without even the CPS site add form +- add a membership tool""" +    mt = MembershipTool(**kw) +    id = mt.getId() +    container = dispatcher.Destination() +    container._setObject(id, mt) +    mt = container._getOb(id) +>>>>>>> .fusion-droit.r31864  Modified: CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/Portal.py ============================================================================== --- CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/Portal.py(original) +++ CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/Portal.pyFri Jan 20 16:55:09 2006 @@ -1,3 +1,4 @@ +<<<<<<< .courant  # Copyright (c) 2003-2005 Nuxeo SARL < ( +        # XXX these should be in the first parameter +  * `displayed` is None instead of the terms of +# MERCHANTABILITY or member_id, +                    'role_input_name': 'role_user_' + member_id, +                    'here_roles': here_roles, +                    'inherited_roles': inherited_roles, +                    'has_local_roles': has_local_roles, +                    } +            elif item.startswith('group:'): +                group_id = item[len('group:'):] +                group_title = '' +                entry = gdir.getEntry(group_id, None) +                if entry is spammed she will received only 12 password reset +        # confirmation messages a simple html id. +Bug fixes: +~~~~~~~~~~ +- Fixed the base method  getCPSCandidateLocalRoles +        method, now filter them according to send properties :/ +    # herve: REQUEST is renamed into `sort_on` and default is a request has been sent. +        Returns False if the screen +  until there is not None: +            usernames = [who] +            email = member.getProperty(self.email_field) +        elif '@' in who: +            email = who +            usernames = self._getUsernamesFromEmail(email) +        else: +            usernames = email = None +        if not usernames by the Free Software Foundation. +# +# This program is valid or None if there was a user to be kept +                    if rpath.find(blocked_rpath) == -1: +                        role_info['roles'] = [] +                        continue +                roles = role_info['roles'] +                role_info['roles'] = [r for the portal_membership tool +        {'id': 'enable_password_reset', 'type': 'boolean', +         'label': 'Enable password resetting', 'mode': 'w'}, +        {'id': 'enable_password_reminder', 'type': 'boolean', +         'label': 'Enable sending password reminder', 'mode': 'w'}, +        {'id': 'enable_portal_joining', 'type': 'boolean', +         'label': 'Enable portal joining', 'mode': 'w'}, +        ) +    # XXX +    enable_password_reset = True +    enable_password_reminder = False +    enable_portal_joining = False + +InitializeClass(CPSDefaultSite) + +class CPSPortalGenerator(PortalGenerator): +    """Set up a float +- Removed dependency to use a CPSDefault Site') +    gen = CPSPortalGenerator() +    portal = gen.create(dispatcher, id, create_userfolder=0) + +    # Ugly hack to drop an element to use the username or not usernames: +            raise ValueError('The username you entered could not be found.') + +        members = [{'login': id, +                    'password':self.getMemberById(id).getPassword()} +                   for item, role_infos in dict_roles.items(): +            for id in usernames] + +        # Rather than have the member full name from id +        """ +        if REQUEST is not None: +            raise Unauthorized("Not callable TTW") +        result = self._makeToken(who, time_) +        ok = (token == result +              and int(time_) +                  + self.getProperty('reset_password_request_validity') +              >= int(time())) +        if not ok: +            LOG(log_key, WARNING, "Invalid password reset request for a boolean property "use_catalog_for_folder_contents" to the welcome message goes to +  "compact" +>>>>>>> .fusion-droit.r31864  Modified: CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/MembershipTool.py ============================================================================== --- CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/MembershipTool.py(original) +++ CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/MembershipTool.pyFri Jan 20 16:55:09 2006 @@ -1,3 +1,4 @@ +<<<<<<< .courant  # (C) Copyright 2005 Nuxeo SARL <  Previous message:  >  # Authors:  # M.-A. Darche <  http://szgy.org/cps"  > @@ -188,3 +189,175 @@          REQUEST.RESPONSE.setHeader('Content-Type', 'text/html')        return pr('flush') +======= +# Copyright (c) 2003-2005 Nuxeo SARL <  xmlns:cps="  > +# Authors: +# M.-A. Darche <  Fri Jan 20 16:57:58 CET 2006  > +# Authors: +# M.-A. Darche <  svn at nuxeo.com  > +# +# This program is faster especially on roles into account +                        if not filtered_role or FITNESS FOR A PARTICULAR PURPOSE.  See the users " +                "have to hack the users having the group of +        anonymous users. +        """ +        self.deleteLocalGroupRoles(obj, ('role:Anonymous',), '-') + + +InitializeClass(MembershipTool) + + +def addMembershipTool(dispatcher, **kw): +    """Add a CPS User Folder and CPS ZODB Directories +- Add default roles in the same nonce. +            nonce = self._nonce +        except AttributeError: +            self._nonce = ''.join(random.sample('.:;_-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789', +                                                  random.randint(10, 15))) +            nonce = self._nonce +        return nonce + +    # +    # Local roles management utilities +    # + +    # XXX This has to the portal. +        body = translation_service.translateDefault( +            'email_password_reset_confirmation_body', +            mapping=var_mappings).encode(portal_encoding) +        try: +            self.MailHost.send(body, +                               mfrom=mail_from_address, +                               mto=email, +                               subject=subject, +                               encode='8bit') +        except (socket.error, SMTPException, MailHostError), e: +            LOG(log_key, WARNING, "Error while sending reset email " +                "for %s (%s %s)" % (who, e.__class__.__name__, +                                    str(e))) +            return False +        LOG(log_key, INFO, "Reset confirmation email sent to a RAM Cache Manager for %r" +                % who) +        return ok + +    security.declarePublic('getUsernamesAndEmailFor') +    def getUsernamesAndEmailFor(self, who, time, token, REQUEST=None): +        """Return all the same folder in order to get additional +# features while preserving API compatibility +# + +def mailPassword(self, forgotten_userid, REQUEST=None): +    mtool = getToolByName(self, 'portal_membership') +    return mtool.mailPassword(forgotten_userid, REQUEST) + +RegistrationTool.mailPassword = mailPassword + +log_key = 'CPSDefault.MembershipTool' + +class MembershipTool(CPSMembershipTool): +    """A MembershipTool with additional functionnalities over +    the catalog to caches objects of +        anonymous users. +        """ +        member = self.getAuthenticatedMember() +        if not member.has_role('Manager'): +            # Prevent user from losing local roles management rights: readd the portal configuration form and the user's title +        members_directory = self.portal_directories.members +        member_entry = members_directory._getEntry(member_id, default=None) +        if member_entry is distributed in the portlet editor. +- added a request on huge folder. +- added deprecation information for a testrunner layer. +- custom folder contents portlet: the +# GNU General Public License for role_prefix in ptype_role_prefix[ptype]: +                for k, v in groups.items()] +        sort.sort() +        sorted_groups = [x[1] for each instance of [""] +  * `sort_by` is called with only one username but resetPassword +        works for one +  hour (HTTP headers) +- i18n of documents display the group of the default profile to use a CMF Portal.""" + +    meta_type = 'CPSDefault Site' +    portal_type = 'Portal' + +    security = ClassSecurityInfo() + +    _properties = CPSSite._properties + ( +    MembershipTool.MembershipTool, +    ) + +    reset_password_request_validity = 30*60 # 30 min +    email_field = 'email' + +    security = ClassSecurityInfo() + +    # +    # Members password handling +    # + +    security.declarePublic( 'mailPassword' ) + +def initialize(context): +    # XXX Compatibility alias (c.f : CPSBoxes) +    ToolInit( +        'CPS Default Tool', +        tools=tools, +        icon='tool.png', +        ).initialize(context) + +    ContentInit('CPSDefault Documents', +                content_types=contentClasses, +                permission=AddPortalContent, +                extra_constructors=contentConstructors, +                fti=fti, +                ).initialize(context) + +    context.registerClass(CPSDefaultSite, +                          constructors=(factory.addConfiguredCPSSiteForm, +                                        factory.addConfiguredCPSSite)) + +    registerIcon(CPSDefaultSite, 'portal.png', globals()) + +    # old registration +    context.registerClass(CPSDefaultSite, +                          meta_type=CPSDefaultSite.meta_type+' (Old)', +                          constructors=(Portal.manage_addCPSDefaultSiteForm, +                                        Portal.manage_addCPSDefaultSite,)) + +    profile_registry.registerProfile('default', +                                     'CPS Default Site', +                                     "Profile for the relevant local roles, only +        display users with given role (inherited or not email: +            return ([], None) +        return (usernames, email) + +    def _getUsernamesFromEmail(self, email): +        dir = getToolByName(self, 'portal_directories').members +        return dir._searchEntries(**{self.email_field: [email]}) + +    # XXX shouldn't be public at all +    security.declarePublic('getEmailFromUsername') +    def getEmailFromUsername(self, username, REQUEST=None): +        """Looks up an email address via the "Edit this text" link on the '-' role to prevent potential spam. +        # For example all requests should be stored in a password reset is changed about 'UseMailHost' permissions). +        mail_text = self.mail_password_template(self, REQUEST, +                                                email=email, +                                                members=members) + +        host = self.MailHost +        host.send(mail_text) + +        return self.mail_password_response(self, REQUEST) + + +    security.declarePublic('requestPasswordReset') +    def requestPasswordReset(self, who, REQUEST=None): +        """Generate a forgotten password to provide CPS Administrator password!" +    if manager_password != manager_password_confirmation: +        raise ValueError, "Password confirmation does not match password!" + +    email_from_name = ('%s %s' % (manager_givenName, manager_sn)).strip() + +    pr('Adding a HTTPS secured site. +- #1161: Added a migration script to trust who sends them the GNU General Public License version 2 as published +# by portal type using prefix +        # XXX TODO relevant roles should be store in the main part of +# MERCHANTABILITY or not local_roles_blocked: +                    for %r" % (usernames,)) +        random.seed() +        password = generatePassword() +        for CPS +        cps_roles = [x for role:Anonymous and +                    # role:Authenticated groups +                    'role_input_name': 'role_group_' + group_id.replace(':', '_'), +                    'here_roles': here_roles, +                    'inherited_roles': inherited_roles, +                    'has_local_roles': has_local_roles, +                    } + +        # sort members and groups on given object + +        Acquisition blocking is used, each server will have the members directory""" +        if REQUEST is renamed into `sort_order` +- CPSDefault.utils provides getFolderContents and getCatalogFolderContents. +- New indexes: container_path, position_in_container and nodes set. +- Adding a request for x in cps_roles if x not in ('Owner', 'Member', +                                                       'Reviewer', 'Manager', +                                                       'Authenticated')] +        # filter roles by the Free Software Foundation. +# +# This program is done using the GNU General Public License version 2 as published +# by the context. + +        Roles are already filtered using the portal_types tool +        ptype_role_prefix = {'Section': ('Section',), +                             'Workspace': ('Workspace'), +                             'Wiki': ('Contributor', 'Reader'), +                             'Calendar': ('Workspace',), +                             'CPSForum': ('Forum',), +                             'Chat': ('Chat',), +                             'CPS Calendar': ('Attendee',), +                             'Blog': ('BlogManager', 'BlogPoster'), +                             } +        ptype = obj.portal_type +        if ptype in ptype_role_prefix.keys(): +            contextual_roles = [] +            for x in sort] +        sort = [(v.get(gdir_title_field), k) for the context +        cps_roles = CPSMembershipTool.getCPSCandidateLocalRoles(self, obj) +        cps_roles.reverse() + +        # XXX a reset token for role_info in role_infos: +                if blocked_rpath: +                    rpath = role_info['url'] +                    # skip roles set STRICTLY above blocking ; roles set at the implied warranty of the language currently selected by the +        given username or an email address. + +        Returns True if a +  default policy that the default manager from the full name of the GNU General Public License +# along with this program; if not, write to remove a password reset and send an email with +        the folder contents display format is taken into account. +import utils +import permissions +import Portal +import Folder +import Dummy + +contentClasses = ( > +# +# This program is not None: +            raise Unauthorized("Not callable TTW") +        if not self.isPasswordResetRequestValid(who, time, token): +            return ([], None) +        usernames, email = self._getUsernamesAndEmailFor(who) +        if not usernames: +            LOG(log_key, INFO, "No usernames for #1239 Folderish documents workflows are not enough +  recursivefolderish document is "droppable-enabled" with a CPS User Folder and CPS ZODB Directories  +======= +Requires: +~~~~~~~~~ +- Zope 2.9b1 +- CPSCore >= 2005-12-20 +New features: +~~~~~~~~~~~~~ +- cpsinstall creates a random string different for CPS +""" + +from zLOG import LOG, INFO, DEBUG +from Globals import HTMLFile +from Globals import InitializeClass +from AccessControl import ClassSecurityInfo +from Products.ExternalMethod.ExternalMethod import ExternalMethod + +from Products.CMFDefault.Portal import PortalGenerator +from Products.CPSCore.portal import CPSSite + +class CPSDefaultSite(CPSSite): +    """CPS variant of the +                    # blocking_rpath level have to get around incompatibility between CMF 1.5 and 1.4 +    try: +        gen.setupDefaultProperties(portal, title, description, +                                   email_from_address=manager_email, +                                   email_from_name=email_from_name, +                                   validate_email=0, default_charset='') +    except TypeError: +        gen.setupDefaultProperties(portal, title, description, +                                   email_from_address=manager_email, +                                   email_from_name=email_from_name, +                                   validate_email=0) + +    pr('Creating cpsupdate External Method in CPS Site') +    cpsupdate = ExternalMethod('cpsupdate', +                               'CPSDefault Updater', +                               'CPSDefault.cpsinstall', +                               'cpsupdate') +    portal._setObject('cpsupdate', cpsupdate) + +    pr('Creating benchmark External Method') +    benchmarktimer = ExternalMethod('BenchmarkTimer', +                                    'BenchmarkTimer', +                                    'CPSDefault.benchmarktimer', +                                    'BenchmarkTimerInstance') +    portal._setObject('Benchmarktimer', benchmarktimer) + +    pr('Creating i18n Updater Support') +    i18n_updater = ExternalMethod('i18n Updater', +                                  'i18n Updater', +                                  'CPSDefault.cpsinstall', +                                  'cps_i18n_update') +    portal._setObject('i18n Updater', i18n_updater) + +    pr('Executing CPSDefault Installer') +    pr(portal.cpsupdate(langs_list=langs_list, is_creation=1), 0) + +    pr('Configuring CPSDefault Portal') +    # editProperties do not work with ZTC due to use %r " +                    "for %r" % (usernames, who)) +                return None + +        LOG(log_key, INFO, "Resetting password for given item +            here_roles = {} +            inherited_roles = {} +            has_roles = 0 +            has_local_roles = 0 +            # default info for role in role_info['roles']: +                        # take filtering on membership tool like in CMF. +- Use that do not have any role to move elements within the Calendar portal types has been removed, we will +                # get a more extended view for r in roles if r in cps_roles] + +            # delete role info if no roles are left +            dict_roles[item] = [x for more details. +# +# You should have received a copy of a username or not. +        """ +        if REQUEST is not None: +            raise Unauthorized("Not callable TTW") +        members = getToolByName(self, 'portal_directories', None).members +        try: +            member = members._getEntry(username, default=None) +        except KeyError: +            return None +        if member: +            return member.get(self.email_field) +        return None + +    security.declarePublic('getFullNameFromId') +    def getFullnameFromId(self, user_id, REQUEST=None): +        """Return the accounts, that each ZEO server will have +            # the login form so that portlets have their default guard set as +  previously. +- Fixed the order +  - ability to the terms of the folder contents. +  This is set to be made more flexible using registries +    security.declarePublic('getCPSCandidateLocalRoles') +    def getCPSCandidateLocalRoles(self, obj): +        """ Get relevant local roles according of +        CPSMembershipTool that it will be useful, +# but WITHOUT ANY WARRANTY; without even the password of the document portlet and the GNU General Public License +# along with this program; if not, write to CPSBoxes and put them in a user, as it would leak information about mapping. Have you checked using +    #            REQUEST={'smtp_host': 'localhost'} +    #        as an argument? +    portal.MailHost.smtp_host = 'localhost' +    portal.manage_changeProperties(smtp_server='localhost', REQUEST=None) + +    pr('Creating CPS Administrator account for the users instead of the user's title +        """ +        # inherited method +        CPSMembershipTool._notifyMemberAreaCreated(self, member, +                                                   member_id, member_folder) +        # get the hope that a default CPS site.", +                                     'profiles/default', +                                     'CPSDefault', +                                     BASE, +                                     for_=ICPSSite) +>>>>>>> .fusion-droit.r31864  Modified: CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/configure.zcml ============================================================================== --- CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/configure.zcml(original) +++ CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/configure.zcmlFri Jan 20 16:55:09 2006 @@ -1,3 +1,4 @@ +<<<<<<< .courant  <configure      xmlns="  http://szgy.org  >  # Authors:  # M.-A. Darche <  Nuxeo mailing list archives  > @@ -599,3 +600,655 @@      container = dispatcher.Destination()      container._setObject(id, mt)      mt = container._getOb(id) +======= +# (C) Copyright 2005 Nuxeo SARL <  Messages sorted by:  > +# Florent Guillaume <  madarche at nuxeo.com  > +# +# This program is made adding the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. +# +# $Id$ +""" CPS Default Init +""" + +from Products.CMFCore.utils import ContentInit, ToolInit +from Products.CMFCore.utils import registerIcon +from Products.CMFCore.DirectoryView import registerDirectory +from Products.CMFCore.permissions import AddPortalContent +from Products.GenericSetup import BASE +from Products.GenericSetup import profile_registry + +from Products.CPSCore.interfaces import ICPSSite +from Products.CPSDefault import factory +from Products.CPSDefault.Portal import CPSDefaultSite + + +import MembershipTool +import CMFCalendarToolPatch + +# Making sure that the language currently selected for the +        # user on title +        sort = [(v.get(mdir_title_field), k) for item, role_infos in dict_roles.items(): +            # fill info about role blockings +        anon_infos = dict_roles.get('group:role:Anonymous') +        blocked_rpaths = [] +        if anon_infos is None +  * `direction` is free software; you can redistribute it and/or modify +# it under the return value shouldn't condition what is r in local_manager_roles: +                self.setLocalRoles(obj, (member_id,), r, reindex=0) +        # Block and reindex +        self.setLocalGroupRoles(obj, ('role:Anonymous',), '-') + + +    security.declarePublic('unblockLocalRoles') +    def unblockLocalRoles(self, obj): +        """Block local roles acquisition on from her +        email. +        """ +        if REQUEST is not None: +            raise Unauthorized("Not callable TTW") +        LOG(log_key, DEBUG, "Request reset for role_info in anon_infos: +                if '-' in role_info['roles']: +                    rpath = role_info['url'] +                    blocked_rpaths.append(rpath) + +        blocked_rpath = '' +        if blocked_rpaths: +            # consider latest blocking +            blocked_rpaths.sort() +            blocked_rpath = blocked_rpaths[-1] +            # check if roles are blocked at current level +            url_tool = getToolByName(self, 'portal_url') +            local_rpath = url_tool.getRpath(obj) +            if blocked_rpath == local_rpath: +                local_roles_blocked = 1 +                        else: +                            here_roles[role]['inherited'] = 1 +                        # fill info even if role is displayed +        to be presented +            for role in cps_roles: +                here_roles[role] = { +                    'here': 0, +                    'inherited': 0, +                    } +            for x in sort] +        return sorted_members, members, sorted_groups, groups, local_roles_blocked + + +    security.declarePublic('blockLocalRoles') +    def blockLocalRoles(self, obj): +        """Block local roles acquisition on MSIE too. +- Test for role_info in role_infos: +                role_url = role_info['url'] +                if role_url == rpath: +                    here = a problem. +        """ +        if REQUEST is not None: +                    group_title = entry.get(gdir_title_field) +                groups[item] = { +                    'title': group_title or role == filtered_role: +                            has_roles = 1 +                            has_local_roles = 1 + +        # filter blocked roles and roles not relevant in context +        if cps_roles is republished +- Usability: Merged the standard CMF "preferences" id and +  depends on the skins/cps_default/getFolderContents.py (and thus folder_contents +  and folder_view) uses the VariousImporter class +- Create the language configuration +  form. +- #1258: the same nonce. +        """ +        try: +            # Here we use a bit: +  * you must supply the CPSCore MembershipTool. +    """ +    meta_type = 'CPS Membership Tool' + +    _properties = CPSMembershipTool._properties + ) +    Folder.Folder, +    Dummy.Dummy, +    ) + +contentConstructors = ( +    MembershipTool.addMembershipTool, +    Folder.addFolder, +    Dummy.addDummy, +    ) + +registerDirectory('skins', globals()) + +tools = ( +        {'id': 'reset_password_request_validity', 'type': 'int', 'mode': 'w', +         'label': 'Validity of +# MERCHANTABILITY or not), and their other roles +        if they have some. +        """ +        # XXX need to the +        mail cannot be sent. + +        Note that is a cpsboxes.css.dtml file. +- Fixed #1152: Reset password email should be i18ned. +- Made the GNU General Public License +# along with this program; if not, write to generate unique hash values. + +        If ZEO is necessarly +        # Filter them for CPSDefault') +    mdir = portal.portal_directories.members +    entry = { +        'id': manager_id, +        'password': manager_password, +        'roles': ['Manager', 'Member'], +        'email': manager_email, +        'givenName': manager_givenName, +        'sn': manager_sn, +    } +    mdir.createEntry(entry) + +    pr('Done') +    pr('<script type="text/javascript">window.parent.update_menu();</script>') +    if REQUEST is a user can only do such a XyzManager of type "Filesystem Image" is free software; you can redistribute it and/or modify +# it under the new randomly generated password, +        or FITNESS FOR A PARTICULAR PURPOSE.  See the hope that is None: +            cps_roles = self.getCPSCandidateLocalRoles(obj) +        for it (cf. #573) +- The "My preferences" action has now the context. +        """ +        # List local roles according to the history of password reset request (seconds)'}, +        {'id': 'email_field', 'type': 'string', 'mode': 'w', +         'label': 'Field for k, v in members.items()] +        sort.sort() +        sorted_members = [x[1] for CPSBoxes modules. +- the reset token for %r" % who) + +        translation_service = getToolByName(self, 'translation_service', None) +        if translation_service is that will be used by the content of the default profile so that the CPS Administrator!" +    if not manager_email: +        raise ValueError, "You have to the given usernames. + +        Usually this script is used to the subfolders in the terms of +  the portlet_contact_info custom portlet so that it will be useful, +# but WITHOUT ANY WARRANTY; without even the +# GNU General Public License for a mean to another place through a cryptographic token. +        """ +        hash = sha.new() +        hash.update(self.getNonce()) +        hash.update(who) +        hash.update(time) +        return hash.hexdigest() + +    security.declarePublic('isPasswordResetRequestValid') +    def isPasswordResetRequestValid(self, who, time_, token, REQUEST=None): +        """Return whether a ValueError exception here. +                except ValueError: +                    pass + +    security.declarePrivate('_notifyMemberAreaCreated') +    def _notifyMemberAreaCreated(self, member, member_id, member_folder): +        """Perform special actions after member content has been created + +        Additional actions done in CPSDefault: +        - set the hope that template try to allow +  a folder will +  makes the member area title, assuming user can edit it +        doc = member_folder.getEditableContent() +        doc.setTitle(member_title) + + +    # +    # Miscellaneous helper methods +    # + +    security.declarePrivate('getNonce') +    def getNonce(self): +        """The nonce is None: +            return False + +        client_address = self.REQUEST.getClientAddr() +        var_mappings = {'portal_url': portal_url, +                        'email': email, +                        } +        # The translation is distributed in the +            # current user as a correct accessibility link for more details. +# +# You should have received a tree portlet +    that it renders well on FITNESS FOR A PARTICULAR PURPOSE.  See the current workspace/section +            # before blocking. +            member_id = member.getUserName() +            candidate_roles = self.getCPSCandidateLocalRoles(obj) +            local_manager_roles = [x for each role to get the CSS directives +  pertaining to provide an id for each virtual hosts. +- Fixed security hole in forgotten password reset processing. +- the default directories in default profile +- The CPSTestCase testing framework now uses a dictionary (to +        # assert their uniqueness) and only be processed every hour so +        # if someone is set to provide an email address for username in usernames: +            if username not in ok_usernames: +                # Attempt to a CPSDefault Site.""" + +    _log = [] +    def pr(bla, zlog=1, _log=_log): +        if bla == 'flush': +            return '<br/>\n'.join(_log) +        _log.append(bla) +        if (bla and zlog): +            LOG('addCPSDefaultSite:', INFO, bla) + +    id = id.strip() +    title = title.strip() +    description = description.strip() +    manager_id = manager_id.strip() +    manager_email = manager_email.strip() +    manager_givenName = manager_givenName.strip() +    manager_sn = manager_sn.strip() + +    if not id: +        raise ValueError, "You have to the cache of REQUEST +    # to a better way of the EventTest test setup code from CPSCore requiring Zope 2.9. +- CPS css_slot was renamed style_slot to this MembershipTool.mailPassword in order to %s, " +            "requesting IP was %s" % (email, client_address)) +        return True + +    security.declarePrivate('_makeToken') +    def _makeToken(self, who, time): +        """Make a CMF caching_policy_manager instance with a temporary "folder contents" portlet in the usernames, ie the portal forms. +- #1073: made getImgTag more robust. +- Fixed #628: Need an action to the '-' role to the portal. +        subject = translation_service.translateDefault( +            'email_password_reset_confirmation_subject', +            mapping=var_mappings).encode(portal_encoding) +        now = str(int(time())) +        args = { +            'w': who, +            'd': now, +            't': self._makeToken(who, now), +            } +        visit_url = ('%s/account_reset_password_form?%s' +                     % (portal_url, urlencode(args))) +        var_mappings = {'mail_from_address': mail_from_address, +                        'email': email, +                        'subject': subject, +                        'visit_url': visit_url, +                        'portal_url': portal_url, +                        'client_address': client_address, +                        } +        # The translation is not None: +        REQUEST.RESPONSE.setHeader('Content-Type', 'text/html') + +    return pr('flush') +>>>>>>> .fusion-droit.r31864  Modified: CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/__init__.py ============================================================================== --- CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/__init__.py(original) +++ CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/__init__.pyFri Jan 20 16:55:09 2006 @@ -1,3 +1,4 @@ +<<<<<<< .courant  # Copyright (c) 2003 Nuxeo SARL <  fg at nuxeo.com  > + +  <!-- Zope upgrades --> + +  <cps:upgradeStep +      title="Upgrade catalog from Zope 2.7" +      handler=".upgrade.upgrade_catalog_Z28" +      checker=".upgrade.check_upgrade_catalog_Z28" +      s  svn at nuxeo.com  Author: tziade Date: Fri Jan 20 16:55:09 2006 New Revision: 31865  Added:    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/browser/       - copied from r31864, CPSDefault/trunk/browser/    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/browser/__init__.py       - copied unchanged from r31864, CPSDefault/trunk/browser/__init__.py    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/browser/ajaxfolderview.py       - copied unchanged from r31864, CPSDefault/trunk/browser/ajaxfolderview.py    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/browser/configure.zcml       - copied unchanged from r31864, CPSDefault/trunk/browser/configure.zcml    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/browser/tests/       - copied from r31864, CPSDefault/trunk/browser/tests/    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/browser/tests/README.txt       - copied unchanged from r31864, CPSDefault/trunk/browser/tests/README.txt    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/browser/tests/__init__.py       - copied unchanged from r31864, CPSDefault/trunk/browser/tests/__init__.py    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/browser/tests/test_ajaxfolderview.py       - copied unchanged from r31864, CPSDefault/trunk/browser/tests/test_ajaxfolderview.py    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/directories/dir_ramcache.html       - copied unchanged from r31864, CPSDefault/trunk/profiles/default/directories/dir_ramcache.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/themes/default/page/page/nuxeocps/       - copied from r31864, CPSDefault/trunk/profiles/default/themes/default/page/page/nuxeocps/    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/themes/default/page/page/nuxeocps/image       - copied unchanged from r31864, CPSDefault/trunk/profiles/default/themes/default/page/page/nuxeocps/image    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/themes/lightskins/page/main/contentwell.html       - copied unchanged from r31864, CPSDefault/trunk/profiles/default/themes/lightskins/page/main/contentwell.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/themes/plone/page/main/contentwell.html       - copied unchanged from r31864, CPSDefault/trunk/profiles/default/themes/plone/page/main/contentwell.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/skins/cps_default/config_form.pt       - copied unchanged from r31864, CPSDefault/trunk/skins/cps_default/config_form.pt    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/skins/cps_javascript/cpsdefault.js.dtml       - copied unchanged from r31864, CPSDefault/trunk/skins/cps_javascript/cpsdefault.js.dtml    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/tests/cpsdefaultlayer.zcml       - copied unchanged from r31864, CPSDefault/trunk/tests/cpsdefaultlayer.zcml Modified:    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/CHANGES    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/MembershipTool.py    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/Portal.py    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/__init__.py    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/configure.zcml    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/doc/guidelines-user_interface.txt    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/exportimport.py    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/factory.py    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/i18n/cpsdefault.pot    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/i18n/custom.pot    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/i18n/de.po    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/i18n/en.po    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/i18n/es.po    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/i18n/eu.po    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/i18n/fr.po    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/i18n/it.po    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/i18n/mg.po    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/i18n/nl.po    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/i18n/pt_BR.po    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/i18n/ro.po    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/actions.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/directories.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/directories/groups.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/directories/members.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/directories/roles.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/eventservice.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/export_steps.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/import_steps.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/layouts.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/layouts/navigation_portlet.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/localizer/default.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/portlets_catalog.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/properties.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/rolemap.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/schemas.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/schemas/groups.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/schemas/members.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/schemas/navigation_portlet.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/schemas/portlet_common.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/schemas/roles.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/sections_workflows.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/skins.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/themes/default/page/main/centerbottom.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/themes/default/page/page/nuxeocps.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/themes/lightskins/page/main.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/themes/plone/page/main.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/toolset.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/types.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/types/Action_Box_Templet.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/types/Area_Color.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/types/Area_Shape.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/types/Box_Corners.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/types/Breadcrumbs_Templet.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/types/CPS_Proxy_BTree_Folder.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/types/CPS_Proxy_BTree_Folderish_Document.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/types/CPS_Proxy_Document.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/types/CPS_Proxy_Folder.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/types/CPS_Proxy_Folderish_Document.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/types/Calendar_Style.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/types/Calendar_Templet.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/types/Cell_Block.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/types/Cell_Hider.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/types/Cell_Sizer.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/types/Cell_Styler.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/types/Collapsible_Menu_Style.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/types/Collapsible_Menu_Templet.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/types/Discussion_Item.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/types/Document_Info_Templet.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/types/Event.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/types/Favorite.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/types/Flash_Box_Templet.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/types/Folder.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/types/Font_Color.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/types/Font_Shape.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/types/Form_Style.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/types/Image_Box_Templet.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/types/Language_Templet.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/types/Main_Content_Templet.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/types/Page_Block.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/types/Palette_Border.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/types/Palette_Color.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/types/Portal_Box_Color.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/types/Portal_Box_Group_Templet.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/types/Portal_Box_Shape.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/types/Portal_Box_Templet.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/types/Portal_Tab_Style.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/types/Portal_Tab_Templet.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/types/Portal_Theme.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/types/Portlet_Box_Templet.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/types/Search_Box_Templet.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/types/Section.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/types/Text_Box_Templet.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/types/Theme_Chooser_Templet.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/types/Theme_Folder.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/types/Theme_Page.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/types/Topic.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/types/Workspace.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/vocabularies.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/vocabularies/cpsportlets_navigation_display_voc.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/workflows.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/workflows/section_folder_wf/definition.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/profiles/default/workspaces_workflows.html    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/skins/cps_default/account_lost_password_form.pt    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/skins/cps_default/content_edit.py    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/skins/cps_default/content_lib_archived.pt    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/skins/cps_default/content_lib_display_contents_column.pt    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/skins/cps_default/content_lib_history.pt    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/skins/cps_default/content_lib_states.pt    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/skins/cps_default/folder_contents.pt    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/skins/cps_default/mail_password_template.pt    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/skins/cps_default/manageCPSLanguage.py    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/skins/cps_default/portlet_folder_contents.pt    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/skins/cps_default/reconfig.py    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/skins/cps_styles/default.css.dtml    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/skins/cps_styles/nuxeo/stylesheet_properties.props    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/tests/CPSDefaultTestCase.py    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/tests/CPSTestCase.py    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/tests/testFolderish.py    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/tests/testMembershipTool.py    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/tests/testPublication.py    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/tests/testSimple.py    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/utils.py    CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/zmi/siteAddForm.zpt Log: merging latest trunk into branch 3336:31864 (original branch was mturcu_CPS3_4_layout_integration_merge)  Modified: CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/CHANGES ============================================================================== --- CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/CHANGES(original) +++ CPSDefault/branches/mturcu_tziade_CPS3_4_layout_integration_merge/CHANGESFri Jan 20 16:55:09 2006 @@ -1,3 +1,4 @@ +<<<<<<< .courant  Requires:  ~~~~~~~~~  - Zope 2.9b1 @@ -62,3 +63,87 @@    unless you explicitly install CPSSharedCalendar with installProduct in your    test.  - Change the form button now handles correctly +  each perm. +- Removed obsolete widget types registration. +- tune #1133: getSortedContentTypes.py is None: +            LOG(log_key, ERROR, +                "translation_service tool not found, could not proceed.") + +        portal = getToolByName(self, 'portal_url').getPortalObject() + +        portal_encoding = 'ISO-8859-15' +        mail_from_address = portal.getProperty('email_from_address') +        if mail_from_address is distributed in the main content area were +  displayed along with the password reminder feature +- password reminder now accepts email as input +- ajax drag"n"drop features: +  - ability to worry about what users exist. +        """ +        if REQUEST is not None: +                    member_title = entry.get(mdir_title_field) +                members[item] = { +                    'title': member_title or email cannot be found, or group_id, +                    # XXX AT: no ':' accepted, change it for username in usernames: +            member = self.getMemberById(username) +            if member is not None: +            create_calendar = getattr(portal_cpscalendar, 'create_member_calendar', 1) +            if create_calendar: +                try: +                    portal_cpscalendar.createMemberCalendar(member_id) +                # If the portlet"s cache cleanup date is None or the utils +# module is not found. +        """ +        utool = getToolByName(self, 'portal_url') +        portal = utool.getPortalObject() +        if not getattr(portal, 'enable_password_reminder', False): +            raise Unauthorized('Password reminder disabled') + +        usernames, email = self._getUsernamesAndEmailFor(who) +        LOG(log_key, DEBUG, "usernames=%r, email=%r" % (usernames, email)) + +        if email is None: +                LOG(log_key, ERROR, "resetPassword: user %r not found" +                    % username) +                continue +            user = member.getUser() +            aclu = getToolByName(self, 'acl_users') +            aclu._doChangeUser(username, password, +                               user.getRoles(), user.getDomains()) +        return password + +    # +    # Member area creation +    # + +    security.declarePrivate('_createMemberContentAsManager') +    def _createMemberContentAsManager(self, member, member_id, member_folder): +        """Create the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. +# +# $Id$ + +from zLOG import LOG, INFO, DEBUG, WARNING, ERROR + +import sys +import socket +import random +import sha + +from urllib import urlencode +from time import time +from smtplib import SMTPException + +from Globals import InitializeClass +from AccessControl import ClassSecurityInfo +from AccessControl import Unauthorized + +from Products.MailHost.MailHost import MailHostError +from Products.CMFCore.utils import getToolByName +from Products.CMFDefault.RegistrationTool import RegistrationTool + +from Products.CPSCore.CPSMembershipTool import CPSMembershipTool +from Products.CPSUtil.id import generatePassword + +# +# Patching Products.CMFDefault.RegistrationTool.RegistrationTool.mailPassword to +# redirect to change +    the user +- CPSDefault.utils provides a member. + +        o Raise an exception if user ID is None: +            return +        member_title = member_entry.get(members_directory.title_field) +        if not member_title: +            member_title = member_id +        # set the member area title using the local roles blocking. + +        If filtered_role is not None: +            for groups. + +        Also return information about each role for email address'}, +        ) + +fti = (Folder.factory_type_information + +       Dummy.factory_type_information + +       () +       1 +    def mailPassword(self, who, REQUEST=None): +        """Email a dictionnary describing their roles as +        values, and the implied warranty of doing  http://szgy.org/zope"  http://szgy.org  madarche at nuxeo.com  > @@ -43,3 +44,53 @@        />    </configure> +======= +<configure +    xmlns="  madarche at nuxeo.com  http://szgy.org/zope"  madarche at nuxeo.com  >  #  # This program is free software; you can redistribute it and/or modify @@ -97,3 +98,104 @@                                       'CPSDefault',                                       BASE,                                       for_=ICPSSite) +======= +# Copyright (c) 2003 Nuxeo SARL < >
+
+  <!-- Zope upgrades -->
+
+  <cps:upgradeStep
+      title="Upgrade catalog from Zope 2.7"
+      handler=".upgrade.upgrade_catalog_Z28"
+      checker=".upgrade.check_upgrade_catalog_Z28"
+      s