6.0.0-RC7
6/17/26

[#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 2/13/17 (3411 days ago)
Due
Updated 2/22/17 (3402 days ago)
Assigned 2/22/17 (3402 days ago)
Resolved 2/22/17 (3402 days ago)
Github Issue Link
Github Pull Request
Milestone Horde_Share 2.1.2
Patch No

History
41 Jan Schneider State ⇒ Resolved
Milestone ⇒ Horde_Share 2.1.2
 
491 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
321 Jan Schneider State ⇒ Assigned
Queue ⇒ Horde Framework Packages
Version ⇒
 
4611 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 |
+----------+----------+--------+--------+--------+---------+-----------+

89 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.
579 Jan Schneider Assigned to Jan Schneider
State ⇒ Assigned
 
154 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