Results 1 to 5 of 5

Thread: zimbra_posixaccount Admin Extension

Hybrid View

  1. #1
    Join Date
    Feb 2006
    Posts
    92
    Rep Power
    9

    Default zimbra_posixaccount Admin Extension

    We found a problem with setting up the groups trough this extension.
    The problem is cosmetic and non functional.
    Cosmetic beacuse the UI ask for the Number UID when entering the members of the group, i think is easier to remember the usernames

    And is non functional because, in red hat at least, when you work with groups you need to enter the NAME no the uid number. This way the system resolve which are the members of the group.

    The UI extension does not let you enter text (the name of the users), only numbers in the member field, so i modified the file to let you enter the name, so everything works (for us at least).

    The file is: /opt/zimbra/tomcat/webapps/service/zimlet/zimbra_posixaccount/ZaPosixGroup.js


    i changed the line 315:

    code:
    {id:ZaPosixGroup.A_memberUid, type:_LIST_, ref:"attrs/"+ZaPosixGroup.A_memberUid, listItem:{type:_NUMBER_}}


    with:

    code
    {id:ZaPosixGroup.A_memberUid, type:_LIST_, ref:"attrs/"+ZaPosixGroup.A_memberUid, listItem:{type:_STRING_}}

    Also i had to change the File: /opt/zimbra/tomcat/webapps/service/zimlet/zimbra_posixaccount/ZaPosixGroupXFormView.js

    the line 139:
    {ref:".", type:_TEXTFIELD_, label:null, onChange:ZaTabView.onFormFieldChanged,cssClass:"ad min_xform_number_input"}

    with:
    {ref:".", type:_TEXTFIELD_, label:null, onChange:ZaTabView.onFormFieldChanged,cssClass:"ad min_xform_name_input"}

    The problem with this last change is when i create a group with only 1 member and then i try to edit the group, Zimbra takes the name and split it by letters, so show every letter of the name as a member of the group.

    I hope Greg could tell me why.
    Last edited by pbruna; 05-08-2007 at 05:10 PM.
    Patricio Bruna
    http://www.itlinux.cl

  2. #2
    Join Date
    Sep 2005
    Location
    Tucson - San Francisco - Moscow
    Posts
    127
    Rep Power
    10

    Default

    Quote Originally Posted by pbruna View Post
    /opt/zimbra/tomcat/webapps/service/zimlet/zimbra_posixaccount/ZaPosixGroup.js

    i changed the line 315:
    /opt/zimbra/tomcat/webapps/service/zimlet/zimbra_posixaccount/ZaPosixGroup.js
    with:
    /opt/zimbra/tomcat/webapps/service/zimlet/zimbra_posixaccount/ZaPosixGroup.js
    Do you mean that you changed

    Code:
    {id:ZaPosixGroup.A_memberUid, type:_LIST_, ref:"attrs/"+ZaPosixGroup.A_memberUid, listItem:{type:_NUMBER_}}
    with

    Code:
    {id:ZaPosixGroup.A_memberUid, type:_LIST_, ref:"attrs/"+ZaPosixGroup.A_memberUid, listItem:{type:_STRING_}}
    Anyway, I think I know what the problem is, please open a bug in bugzilla and CC me on this bug (my id in bugzilla is greg '@' zimbra - dot - com
    Last edited by Greg; 05-08-2007 at 05:15 PM. Reason: add a note
    Bugzilla - Wiki - Downloads - Before posting... Search!
    P.S.: don't forget to vote on this bug
    add Samba LDAP entries to Exchange Migration Tool

  3. #3
    Join Date
    Feb 2006
    Posts
    92
    Rep Power
    9

    Default

    Greg,
    You are correct.
    Patricio Bruna
    http://www.itlinux.cl

  4. #4
    Join Date
    Sep 2005
    Location
    Tucson - San Francisco - Moscow
    Posts
    127
    Rep Power
    10

    Default

    Try this, add

    Code:
    	
    if(this.attrs && this.attrs[ZaPosixGroup.A_memberUid] && !(this.attrs[ZaPosixGroup.A_memberUid] instanceof Array))
    		this.attrs[ZaPosixGroup.A_memberUid] = [this.attrs[ZaPosixGroup.A_memberUid]];
    to the end of

    ZaPosixGroup.prototype.initFromJS

    method, resulting code should be this:

    Code:
    ZaPosixGroup.prototype.initFromJS = function(posixGroup) {
    	ZaItem.prototype.initFromJS.call(this, posixGroup);
    
    	if(this.attrs && this.attrs[ZaPosixGroup.A_gidNumber])
    		this.id = this.attrs[ZaPosixGroup.A_gidNumber];
    		
    	if(!this.name && this.attrs && this.attrs[ZaPosixGroup.A_cn])
    		this.name = this.attrs[ZaPosixGroup.A_cn];
    
    	if(this.attrs && this.attrs[ZaPosixGroup.A_memberUid] && !(this.attrs[ZaPosixGroup.A_memberUid] instanceof Array))
    		this.attrs[ZaPosixGroup.A_memberUid] = [this.attrs[ZaPosixGroup.A_memberUid]];
    }
    instead of this:

    Code:
    ZaPosixGroup.prototype.initFromJS = function(posixGroup) {
    	ZaItem.prototype.initFromJS.call(this, posixGroup);
    	
    	if(this.attrs && this.attrs[ZaPosixGroup.A_gidNumber])
    		this.id = this.attrs[ZaPosixGroup.A_gidNumber];
    		
    	if(!this.name && this.attrs && this.attrs[ZaPosixGroup.A_cn])
    		this.name = this.attrs[ZaPosixGroup.A_cn];
    
    }
    Bugzilla - Wiki - Downloads - Before posting... Search!
    P.S.: don't forget to vote on this bug
    add Samba LDAP entries to Exchange Migration Tool

  5. #5
    Join Date
    Feb 2006
    Posts
    92
    Rep Power
    9

    Default

    Greg,
    Thanks a lot, it worked perfectly.
    Patricio Bruna
    http://www.itlinux.cl

Similar Threads

  1. Disable SSL on the Admin Port 7071
    By rasputin in forum Installation
    Replies: 2
    Last Post: 04-06-2008, 04:29 AM
  2. restore admin account
    By preem in forum Administrators
    Replies: 2
    Last Post: 01-19-2007, 07:56 AM
  3. How do I set Admin password?
    By sjames in forum Installation
    Replies: 4
    Last Post: 07-24-2006, 05:01 PM
  4. Zimbra refuses to auth admin.
    By alexbsa in forum Administrators
    Replies: 1
    Last Post: 12-05-2005, 12:23 PM
  5. Admin Account
    By rmvg in forum Users
    Replies: 4
    Last Post: 09-19-2005, 12:03 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •