[Tickets #13954] Premission removing owner with horde hooks
noreply at bugs.horde.org
noreply at bugs.horde.org
Wed Apr 15 22:35:18 UTC 2015
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: https://bugs.horde.org/ticket/13954
------------------------------------------------------------------------------
Ticket | 13954
Created By | bonnaud at hotmail.com
Summary | Premission removing owner with horde hooks
Queue | Ansel
Version | 3.0.2
Type | Bug
State | Unconfirmed
Priority | 1. Low
Milestone |
Patch |
Owners |
------------------------------------------------------------------------------
bonnaud at hotmail.com (2015-04-15 22:35) wrote:
I use a horde hook to add the @spagi.net to the user if not specified
the function is as follow
public function authusername($userId, $toHorde)
{
// Example #1: Append the virtual domain to the username only
if a domain is not already specified.
// ex. $HTTP_HOST = 'mail.mydomain.com', $userId = 'myname' returns:
// 'myname at mydomain.com'
// but $userId = 'myname at mydomain.com' returns self
$vdomain = preg_replace('|^mail\.|i', '', getenv('HTTP_HOST'));
$vdomain = Horde_String::lower($vdomain);
if ($toHorde) {
if (stripos($userId, '@')){
return $userId;
}else{
return $userId . '@' . $vdomain;
}
}
It works well in Ansel EXCEPT if I try to change the permission on a
gallery. Doing so will result that in the SQL table the field
share_owner will simply record as "@mydomain.com" stripping the user
and thus removing ownership of the gallery.
On the web interface I tried specifing the owner in the box but doing
so the changes in the permission aren't recorded. So the only work
around right now is to make the change in the permission and after
that go manually in the database in ansel_shares and add the user in
front of the @domain.com
More information about the bugs
mailing list