Re: Access rights problem w/multilingual sites / BUG

"Dan Drehobl" <[email protected]>
Newsgroups gmane.comp.cms.zms.devel
Message-ID <[email protected]>
I found the solution:

It is a BUG

In the file: zms/dtml/zms/manage_users.dtml,

<dtml-let multilang="_.len(getLangIds())>1"
nodes="getUserAttr(name,'nodes',{})" nodekeys="nodes.keys()">

closes too early.
you need to redefine multilang for the display of the multi-select box
again. (see code below)
-----------------------------------------------------------
-----------------------------------------------------------
<!-- define multilang again START -->
        <dtml-let multilang="_.len(getLangIds())>1" >
          <dtml-unless multilang>         
           <input type="hidden" name="langs" value="<dtml-var lang>"/>
          </dtml-unless>
          <table cellspacing="0" cellpadding="0" border="0">
          <tr valign="middle">
           <td rowspan="2" class="form-small">&nbsp;</td>
           <dtml-if multilang>
            <td class="form-small"><b><dtml-var
"getLangStr('ATTR_LANGS',manage_lang)"></b></td>
            <td rowspan="2" class="form-small">&nbsp;</td>
            <td rowspan="2" class="zmiNeutralColorMedium0"><img
src="<dtml-var spacer_gif>" title="" border="0" width="1" height="1"
/></td>
            <td rowspan="2" class="form-small">&nbsp;</td>
           </dtml-if>
           <td class="form-small"><b><dtml-var
"getLangStr('ATTR_ROLES',manage_lang)"></b></td>
           <td rowspan="2" class="form-small">&nbsp;</td>
          </tr>
          <tr valign="middle">
           <dtml-if multilang>
            <td class="form-small">
             <dtml-var "f_selectInput(_,_,
               fmName='form1',
               elName='langs',
               value=[],
               type='multiselect',
               lang_str='ATTR_LANGS',
               required=1,
               css='form-small',
               optpl=langs_optpl)">
            </td>
           </dtml-if>
           <td class="form-small">
            <dtml-var "f_selectInput(_,_,
              fmName='form1',
              elName='roles',
              value=[],
              type='multiselect',
              lang_str='ATTR_ROLES',
              required=1,
              css='form-small',
              optpl=roles_optpl)">
           </td>
          </tr>
          </table>
        </td>
        </dtml-let>
<!-- define multilang again END -->
-----------------------------------------------------------
-----------------------------------------------------------

--- In [email protected], "Dan Drehobl" <spam@...> wrote:
>
> I have the same problem.
> Roles are only work only in one language.
> The language selection for the zms-roles is not visible and therefore
> not selectable.
> 
> Re-Importing did not help either.
> For some reason zms does not know that I have multiple languages.
> Where can I look it up?
> 
> 
> --- In [email protected], "Patrick Ehrlich" <ehrlich@>
> wrote:
> >
> > Hi karsten,
> > 
> > i`ve had this phenomenon some times before. I think this can happen
> > after importing a zms folder containing a multilingual site. Sometimes
> > the authors language selection was degraded to the primary language.
> > Re-importing that site should help...
> > 
> > Patrick
> > 
> > 2007/7/5, Karsten W. Rohrbach <rohrbach-lists@>:
> > >
> > >
> > >
> > >
> > >
> > >
> > > Hello ZMS Developers.
> > >
> > >  It's been a long time, nevertheless I've got a serious problem
with a
> > >  multilingual site setup:
> > >
> > >  - The Site has three languages ('de', 'en', 'ch'). The lang codes
> need
> > >    to be this way because of external integration requirements.
> > >  - When a user with role "Administrator" accesses the ZMI, all
> languages
> > >    are accessible and everything works fine.
> > >  - When a user with role "Author" or "Editor" is created, there is
> only
> > >    one language assigned per node and this user can only access
> the ZMI
> > >    for this language version of the site. There is no option to
assign
> > >    more than one language to the user.
> > >
> > >  Two quick questions before I dive down into the code:
> > >  - Is this behaviour triggered by not using the "magic" language
> strings
> > >    "ger" et al., but "de" and so on?
> > >  - Am I missing something in the user interface when
creating/editing
> > >    users and roles?
> > >
> > >  The target system is a quite new installation ZMS2.10.1-33/Zope
> > >  2.10.3-final, Python 2.4.4, Linux.
> > >
> > >  Any ideas?
> > >
> > >  With best regards,
> > >  /karsten
> > >
> > >  --
> > >  > Anthony's Law of Force: Don't force it; get a larger hammer.
> > >  webmonster.de -- InterNetWorkTogether -- built on the open source
> platform
> > >  http://www.webmonster.de/ - ftp://ftp.webmonster.de/ -
> http://www.rohrbach.de/
> > >  GnuPG:   0xDEC948A6 D/E BF11 83E8 84A1 F996 68B4  A113 B393 6BF4
> DEC9 48A6
> > >  Please do not remove my address from To: and Cc: fields in
> mailing lists. 10x
> > >
> > >                    
> > 
> > 
> > 
> > -- 
> > infosion Ltd. & Co. KG
> > Clever Straße 32a
> > D - 50668 Köln
> > 
> > T +49.(0)221.270708.0
> > F +49.(0)221.270708.55
> > 
> > mailto:ehrlich@
> > http://www.infosion.de
> > 
> > Handelsregister: HRA 22986 AG Köln
> > Geschäftsführung: Patrick Ehrlich
> >
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.