6.0.0-beta1
8/7/25

[#14578] Calendars with Delegate permissions are not deleted correctly
Summary Calendars with Delegate permissions are not deleted correctly
Queue Horde Framework Packages
Type Bug
State Resolved
Priority 1. Low
Owners jan (at) horde (dot) org
Requester wahnes (at) uni-koeln (dot) de
Created 02/13/2017 (3097 days ago)
Due
Updated 02/22/2017 (3088 days ago)
Assigned 02/22/2017 (3088 days ago)
Resolved 02/22/2017 (3088 days ago)
Github Issue Link
Github Pull Request
Milestone Horde_Share 2.1.2
Patch No

History
02/22/2017 01:34:04 PM Jan Schneider State ⇒ Resolved
Milestone ⇒ Horde_Share 2.1.2
 
02/22/2017 01:33:49 PM Git Commit Comment #4 Reply to this comment
Changes have been made in Git (master):

commit 753923287843ce7885570df2574db4c60be66f72
Author: Jan Schneider <jan@horde.org>
Date:   Wed Feb 22 14:33:15 2017 +0100

     [jan] Fix removing custom permssions when removing a user or 
group from a share (Bug #14578).

  framework/Share/lib/Horde/Share/Object.php | 12 ++----------
  framework/Share/package.xml                |  4 ++--
  2 files changed, 4 insertions(+), 12 deletions(-)

http://github.com/horde/horde/commit/753923287843ce7885570df2574db4c60be66f72
02/22/2017 01:33:32 PM Jan Schneider State ⇒ Assigned
Queue ⇒ Horde Framework Packages
Version ⇒
 
02/22/2017 11:32:46 AM wahnes (at) uni-koeln (dot) de Comment #3 Reply to this comment
I cannot reproduce this, and I don't see how this could happen either.
I'm sorry, I mixed things up when I wrote down the bug report.

The actual problem arises when horde-remove-user-data is executed for 
the user that has got "Delegate" permissions on the share, not the 
share owner.

Example:
mysql> select * from kronolith_sharesng_users where share_id=101638;
+----------+----------+--------+--------+--------+---------+-----------+
| share_id | user_uid | perm_2 | perm_4 | perm_8 | perm_16 | perm_1024 |
+----------+----------+--------+--------+--------+---------+-----------+
|   101638 | bbeispie |      1 |      1 |      1 |       1 |         1 |
|   101638 | jwahnes  |      1 |      1 |      1 |       0 |         0 |
+----------+----------+--------+--------+--------+---------+-----------+

$ horde-remove-user-data bbeispie
Removing data of user(s):
   bbeispie

Are you sure you want to remove user data?
     (y) Yes
     (n) No

Ihre Auswahl [n]: y
[   OK   ] bbeispie: Data removed.

mysql> select * from kronolith_sharesng_users where share_id=101638;
+----------+----------+--------+--------+--------+---------+-----------+
| share_id | user_uid | perm_2 | perm_4 | perm_8 | perm_16 | perm_1024 |
+----------+----------+--------+--------+--------+---------+-----------+
|   101638 | bbeispie |      0 |      0 |      0 |       0 |         1 |
|   101638 | jwahnes  |      1 |      1 |      1 |       0 |         0 |
+----------+----------+--------+--------+--------+---------+-----------+

02/22/2017 09:57:08 AM Jan Schneider Comment #2
State ⇒ Feedback
Reply to this comment
I cannot reproduce this, and I don't see how this could happen either. 
In _removeShare() 
https://github.com/horde/horde/blob/master/framework/Share/lib/Horde/Share/Sql.php#L791 we completely delete the rows from the share tables that are associated with the calendars that we are removing. We don't resent permission flags 
individually.
02/22/2017 09:19:57 AM Jan Schneider Assigned to Jan Schneider
State ⇒ Assigned
 
02/13/2017 04:33:15 PM wahnes (at) uni-koeln (dot) de Comment #1
State ⇒ Unconfirmed
Patch ⇒ No
Milestone ⇒
Queue ⇒ Kronolith
Summary ⇒ Calendars with Delegate permissions are not deleted correctly
Type ⇒ Bug
Priority ⇒ 1. Low
Reply to this comment
A calender which is shared with another user, giving out  "Delegate" 
permissions (perm_1024), is not properly deleted when the user that 
this calendar belongs to has its data deleted through 
horde-remove-user-data.

Instead, upon horde-remove-user-data, the other permissions on this 
particular entry in the kronolith_sharesng_users table are set to zero 
(e.g. perm_8 is set to 0), but the perm_1024 column remains at the 
previous value "1". This is with the sharesng SQL driver at least, I 
have not tried using other backends.

Saved Queries