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 |
Milestone ⇒ Horde_Share 2.1.2
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
Queue ⇒ Horde Framework Packages
Version ⇒
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 |
+----------+----------+--------+--------+--------+---------+-----------+
State ⇒ Feedback
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.
State ⇒ Assigned
State ⇒ Unconfirmed
Patch ⇒ No
Milestone ⇒
Queue ⇒ Kronolith
Summary ⇒ Calendars with Delegate permissions are not deleted correctly
Type ⇒ Bug
Priority ⇒ 1. Low
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.