Summary | Premission removing owner with horde hooks |
Queue | Ansel |
Queue Version | 3.0.2 |
Type | Bug |
State | Not A Bug |
Priority | 1. Low |
Owners | |
Requester | bonnaud (at) hotmail (dot) com |
Created | 04/15/2015 (3707 days ago) |
Due | |
Updated | 04/15/2015 (3707 days ago) |
Assigned | |
Resolved | 04/15/2015 (3707 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
it both way according to you. It worked.
Thanks
auth username.
horde all property are stored as "firstname.lastname@domain.com" and
even the first creation of the gallery in ansel store it that way.
If I convert back to the auth username it will brake permission still
since the owner will be from firstname.lastname@domain.com to only
firstname.lastname
auth username.
State ⇒ Not A Bug
auth username.
function is properly closed.
Priority ⇒ 1. Low
Patch ⇒ No
Milestone ⇒
Queue ⇒ Ansel
Summary ⇒ Premission removing owner with horde hooks
Type ⇒ Bug
State ⇒ Unconfirmed
the function is as follow
public function authusername($userId, $toHorde)
{
// Example
#1: Append the virtual domain to the username onlyif a domain is not already specified.
// ex. $HTTP_HOST = 'mail.mydomain.com', $userId = 'myname' returns:
// 'myname@mydomain.com'
// but $userId = 'myname@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