Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-08-2007, 03:11 PM
Project Contributor
 
Posts: 87
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.
__________________
Patricio Bruna
http://www.it-linux.cl/pbruna

Last edited by pbruna; 05-08-2007 at 04:10 PM..
Reply With Quote
  #2 (permalink)  
Old 05-08-2007, 04:00 PM
Zimbra Employee
 
Posts: 127
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
__________________
Bugzilla - Wiki - Downloads - Before posting... Search!
P.S.: don't forget to vote on this bug
add Samba LDAP entries to Exchange Migration Tool

Last edited by Greg; 05-08-2007 at 04:15 PM.. Reason: add a note
Reply With Quote
  #3 (permalink)  
Old 05-08-2007, 04:09 PM
Project Contributor
 
Posts: 87
Default

Greg,
You are correct.
__________________
Patricio Bruna
http://www.it-linux.cl/pbruna
Reply With Quote
  #4 (permalink)  
Old 05-08-2007, 05:04 PM
Zimbra Employee
 
Posts: 127
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
Reply With Quote
  #5 (permalink)  
Old 05-08-2007, 07:06 PM
Project Contributor
 
Posts: 87
Default

Greg,
Thanks a lot, it worked perfectly.
__________________
Patricio Bruna
http://www.it-linux.cl/pbruna
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.