August 12 2008posted by Santi

Bloquear perfiles según patrón

El funcionamiento por defecto de la seguridad en proyectos de KMKey consiste en tener al menos los siguientes perfiles a nivel de aplicación:

  • WorkspaceReader:  asignado a todo el mundo con usuario (Authenticated)
  • WorkspaceMember: asignado a aquellos usuarios con capacidad de creación de proyectos o contactos
  • WorkspaceManager: asignado únicamente al administrador

Por defecto, al crear un nuevo proyecto, se ...

August 11 2008posted by Santi

Incluir links a objetos en un patrón de trabajo

Desde la versión 08.07.01 KMKey incorpora la posibilidad de incluir en la definición de los patrones de trabajo enlaces a otros objetos existentes.    Ello se traduce en que cada vez que se crea un proyecto basado en ese patrón de trabajo, se crean también enlaces a esos objetos.


El caso concreto que fomentó este desarrollo era el de un ...

June 16 2008posted by Santi

Bloquear partes de un upgrade

De vez en cuando es necesario configurar de forma distinta, para un cliente en concreto, partes genéricas de la aplicación.   Por ejemplo, en clientes donde no se use la gestión de recursos, puede ser necesario deshabilitar el action correspondiente en el portal_actions.   Pero ese cambio desaparecería al realizarse el próximo import del step "Actions Provideers".    Para evitarlo se ha incluido, ...

June 16 2008posted by Santi

Gestionar Traducciones de KMKey

KMKey está desarrollado sobre CPS y Zope 2.9.4, con lo que gestiona las traducciones por dos vías distintas: la incorporada por CPS, usando Localizer al estilo Zope 2, y la incorporada por Five al estilo Zope 3. Es importante tener claro qué partes del programa usan cada uno de los tipos de traducción:

  1. En ...

April 23 2008posted by Santi

Creating KMKey Patterns

A KMKey Pattern is the way to say how we can work on each type of our projects or files. It is like an object type, plus a workflow, plus a set of tasks, plus a set of subojects, plus permissions definition, plus documents to generate, etc. Similar concepts, in other areas, are business patterns or ISO 9000 process definitions. ...

April 2 2008posted by Santi

Managing newnesses

When working in group, it's important to be notified of changes that others do and we are interested on.    When working with a lot of data, it's also important not to be disturbed by notifications referencing objects we are not interested on.   In KMKey, we name that logic newnesses management.

Nowadays, KMKey 3 trunk has a simple notifications framework, ...

March 24 2008posted by Santi

Managing permissions in KMKey

Permission management in Zope is so flexible that it's necessary to define a way of work to obtain good results.  We want KMKey 3 to be able to have projects in any place in a tree of containers.   And we also want people to access in many ways:

   1. Someone could have access to the root of containers ...

March 6 2008posted by Santi

Render widgets from own code

CPSSchema's allows to render automatic pages for edit, create or view objects, based on defined portal_layouts. But, how we can render directly the widgets in theese layouts, so we can write our own page template ?  Using KMKey it's simple, just inherit your view from Products.KMKeyCore.baseview.KMKeyBaseView, and use the renderWidget function:

  
    def renderWidget(self, layout_id, widget_id, proxy=None, ...

February 22 2008posted by Santi

Debugging Zope 2.9+

In Zope 2.9, the refresh feature doesn't work, so the best way to debug when developing is:

   1. Run your zope using bin/runzope, and use CTRL-C to restart every time you want to test your changes

   2. Use import pdb; pdb.set_trace() wherever you want in your code. This will break the zope execution in that point ...

February 4 2008posted by Santi

Expressions in CPS and KMKey

When configuring CPS in the ZMI, there are a lot of places where you can write TALES expressions. In each case, the available bindings are different, and it's difficult to remember it. Here there is a list of available expressions:

Expressions used in Default Value of Fields

        mapping = {
            'field': self,
            'datamodel': datamodel,
            ...