[#10482] "standard" sharing with a group don't work
Summary "standard" sharing with a group don't work
Queue Kronolith
Queue Version 3.0.9
Type Bug
State Resolved
Priority 1. Low
Owners jan@horde.org
Requester xavier.montagutelli@unilim.fr
Created 2011-09-02 (2914 days ago)
Due
Updated 2011-09-05 (2911 days ago)
Assigned 2011-09-05 (2911 days ago)
Resolved 2011-09-05 (2911 days ago)
Milestone 3.0.10
Patch No

Comments
xavier.montagutelli@unilim.fr 2011-09-02 15:44:39
If I want to share a calendar with a group the new "standard" 
interface does'n work. The "advanced" sharing work.

I don't have any error message, the web interface says it works, but 
the sahres don't change.

Adding messages in Kronolith.php, I see that the  $g_names var in 
function readPermsForm doesn't hold the new value.

A JS console show an error message :

Uncaught TypeError: Cannot call method 'setValue' of null
KronolithCore.permsClickHandler56d8fc83ad2c16eec45ddb43691c39b6.js:862
KronolithCore.clickHandler56d8fc83ad2c16eec45ddb43691c39b6.js:967
(anonymous function)64721a9db0cd1b876919a8be52055911.js:55
_createResponder.responder64721a9db0cd1b876919a8be52055911.js:538

Dev tools IE9 says it is in $('kronolithC'+type+'PGshow_'+group).setValue(1)

Jan Schneider <jan@horde.org> 2011-09-04 17:27:13
Any chance you are using LDAP groups?

xavier.montagutelli@unilim.fr 2011-09-05 06:52:56
> Any chance you are using LDAP groups?

Yes, sorry I didn't mention it.

The groups are from our LDAP directory :

$conf['group']['params']['basedn'] = 'ou=XXXX,dc=univ,dc=fr';
$conf['group']['params']['scope'] = 'one';
$conf['group']['params']['gid'] = 'cn';
$conf['group']['params']['memberuid'] = 'memberUid';
$conf['group']['params']['attrisdn'] = false;
$conf['group']['params']['newgroup_objectclass'] = array('posixGroup');
$conf['group']['params']['search']['objectclass'] = array('posixGroup');
$conf['group']['params']['search']['filter_type'] = 'objectclass';
$conf['group']['params']['driverconfig'] = 'horde';
$conf['group']['driver'] = 'Ldap';


Jan Schneider <jan@horde.org> 2011-09-05 10:35:13
It actually doesn't have anything to do with LDAP groups.

Git Commit <commits@lists.horde.org> 2011-09-05 11:53:33
Changes have been made in Git for this ticket:

No need to reload the group list here, it's already loaded when 
opening the calendar (Bug #10482).

  1 files changed, 1 insertions(+), 2 deletions(-)
http://git.horde.org/horde-git/-/commit/03fe38f0ba184fac47dec7f7979e781a75cdbb0e

Git Commit <commits@lists.horde.org> 2011-09-05 11:53:36
Changes have been made in Git for this ticket:

[jan] Fix race condition when editing group permission in basic 
permission screen (Bug #10482).

  2 files changed, 4 insertions(+), 0 deletions(-)
http://git.horde.org/horde-git/-/commit/4ba01aa8554f01e4e85786bd78da1bc68547f5b4

xavier.montagutelli@unilim.fr 2011-09-05 13:28:45
> Changes have been made in Git for this ticket:
>
> No need to reload the group list here, it's already loaded when 
> opening the calendar (Bug #10482).
>
>  1 files changed, 1 insertions(+), 2 deletions(-)
> http://git.horde.org/horde-git/-/commit/03fe38f0ba184fac47dec7f7979e781a75cdbb0e

Thank you very much for being so quick at fixing bugs.

I have applied the patch against my kronolith/js/kronolith.js file and 
removed all .js files in my "static/" directory.

Now I don't have any JS error. But sharing only works for the first 
group in the list. I am member of more than one group ; the share is 
created for the first group, even if I select another one in the 
dropdwon list.

Looks like the "permsClickHandler" function is called when I click on 
any radiobutton, but not when I use the dropdown menu to select 
another group. Adding with firebug :

onchange="KronolithCore.permsClickHandler('internal', 'G')"

to the "kronolithCinternalPGList" div resolves completely the bug, but 
I don't know where to put that on the PHP/JS code ...


NB : the rest of my Horde / Kronolith code is still in "stable" branch !!


Jan Schneider <jan@horde.org> 2011-09-05 13:40:07
I'm not sure what you mean. Do you want the radiobox for group 
shareing to be automatically checked if you change the group drop down 
list?

xavier.montagutelli@unilim.fr 2011-09-05 13:56:52
> I'm not sure what you mean. Do you want the radiobox for group 
> shareing to be automatically checked if you change the group drop 
> down list?

Not at all.

The bug is not completely corrected with the patch. Whatever group I 
choose in the list, the share is created for the *first* group.

  Adding the attribute
onchange="KronolithCore.permsClickHandler('internal', 'G')"
to the list of groups (<select> tag with 
id="kronolithCinternalPGList") seems to correct the bug.


Git Commit <commits@lists.horde.org> 2011-09-05 14:50:54
Changes have been made in Git for this ticket:

[jan] Update group permission when changing group down list in basic 
permissions (Bug #10482).

  3 files changed, 10 insertions(+), 0 deletions(-)
http://git.horde.org/horde-git/-/commit/6389f44a8e4a1527ab3a828f09a3702e35f09755

xavier.montagutelli@unilim.fr 2011-09-05 15:56:12
> Changes have been made in Git for this ticket:

Great, it works perfectly now, thanks.