6.0.0-RC7
6/29/26

[#3968] ACL tool does not list newly created ACL
Summary ACL tool does not list newly created ACL
Queue IMP
Queue Version HEAD
Type Bug
State Resolved
Priority 1. Low
Owners
Requester ekg2002 (at) columbia (dot) edu
Created 5/23/06 (7342 days ago)
Due
Updated 6/24/06 (7310 days ago)
Assigned 5/24/06 (7341 days ago)
Resolved 6/24/06 (7310 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
388 Matt Selsky Comment #11
State ⇒ Resolved
Reply to this comment
I just committed a fix for _connect() to solve the foreach() warning.   
Looks OK here on both PHP4 and PHP5 systems.
167 Matt Selsky Comment #10 Reply to this comment
Warning: Invalid argument supplied for foreach() in 
/etc/httpd/htdocs/horde/imp/acl.php on line 141

Warning: Invalid argument supplied for foreach() in 
/etc/httpd/htdocs/horde/imp/acl.php on line 180
1811 Michael Slusarz Comment #9 Reply to this comment
Try what I just committed to HEAD and 3.1.2.
447 Jan Schneider Comment #8 Reply to this comment
Instead of checking for the PHP version, you should check if 
imap_getacl() exists, this is semantically more correct. Also, all 
imap_* calls (beside the imap_error* calls) need to be silenced. And 
you shouldn't use $_connected, but instead check in _connect() whether 
the connection has already been made.

Beside that, looks good.
314 Matt Selsky Comment #7
New Attachment: imap_getacl.patch Download
Reply to this comment
How's this look?
281 ekg2002 (at) columbia (dot) edu Comment #6 Reply to this comment
I vote for Chuck's suggestion.
461 Chuck Hagenbuch Comment #5 Reply to this comment
1) Add a sleep() before the GETACL (or after the SETACL) to allow
time for propogation to occur.
2) Store the ACL information on the client and use that instead of
asking the server again.
3) Use PHP5's imap_getacl() if available since it will use the same
stream (aka same server) as the SETACL.

None of these seem correct.
Aside from not being comprehensive, what's wrong with the php 5 
solution? Could even combine it with the sleep(), only sleeping for 
php 4. Not pretty, but at least it's compartmentalized.
4510 Matt Selsky Comment #4 Reply to this comment
We're using Cyrus 2.3 with Murder.  What seems to be happening is that 
SETACL and GETACL are run on different Cyrus front-end servers.  The 
ACL information hasn't propogated to all servers by the time GETACL is 
run so the data is stale.  Options include:



1) Add a sleep() before the GETACL (or after the SETACL) to allow time 
for propogation to occur.

2) Store the ACL information on the client and use that instead of 
asking the server again.

3) Use PHP5's imap_getacl() if available since it will use the same 
stream (aka same server) as the SETACL.



None of these seem correct.
389 Jan Schneider Comment #3
State ⇒ Feedback
Reply to this comment
Works perfectly for me here with Cyrus 2.2.12 and PLAIN authentication.
5912 ekg2002 (at) columbia (dot) edu Comment #2
New Attachment: acldiag.png Download
Reply to this comment
After some investigation Matt Selsky and I have obtained some more 
information.



First of all, we're running Cyrus IMAP with RFC 2086 ACL support.



It seems that the query made in the connection created in Horde's 
_getACL() in rfc2086.php is not obtaining the correct information 
after the imap_setacl() function is invoked earlier in the page load.



Upon submitting a new acl, imap_setacl is called with the new 
information. For testing purposes, I inserted an imap_getacl (> PHP 5) 
call immediately after this and the returned array contains the 
correct information.



Later in invocation, _getACL executes a standard IMAP GETACL query, 
but the server response does not contain the newly created ACL, 
meaning the array returned by _getACL is incorrect.



Attached is a screenshot that shows this information.
171 ekg2002 (at) columbia (dot) edu Comment #1
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ ACL tool does not list newly created ACL
Queue ⇒ IMP
New Attachment: acl_fail.png Download
State ⇒ Unconfirmed
Reply to this comment
After submitting a new ACL, the tool confirms the ACL was created but 
does not show the ACL in the list. See attached screenshot.

Saved Queries