Summary | Perms_UI is storing Auth::listUsers() "Display Name" |
Queue | Horde Framework Packages |
Queue Version | HEAD |
Type | Bug |
State | Not A Bug |
Priority | 1. Low |
Owners | |
Requester | thomas (at) gelf (dot) net |
Created | 03/17/2009 (5954 days ago) |
Due | |
Updated | 03/17/2009 (5954 days ago) |
Assigned | |
Resolved | 03/17/2009 (5954 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | Yes |
displaying user ids in the frontend.
thank you for your quick response! As written below in the meantime I
realized that listUsers is not doing what I expected it to do. So I've
probably been a little bit too fast in posting this ;-) I'm using a
custom LDAP Auth backend, based on the upcoming Zend_Ldap component
(the one from "incubator", not the stable one). And: no, I'm not
supposing it to be "better", I have other reasons for using it ;-)
As fair as I understood now, there is no kind of enumUsers() to be
found, wouldn't that be a good addition? For compatibility reasons
Auth.php could provide it's own enumUsers() function, wrapping
listUsers() into an array with appropriate keys for Auth backends not
providing their own enumUsers() function.
It's just an idea, it could avoid identity hooks in some cases
(Whups?) - in my case it helps making permission assignment easier.
Our AD-users are in the form "uabcd" (u + 4 chars) for historical
reasons, showing "real" names makes managing permissions a lot easier.
I'll for sure not be offended it you see no sense in this, so please
feel free to close this ticket. If otherwise you would like me to
provide additional patches showing how this could look like, please
let me know.
Regards,
Thomas
State ⇒ Not A Bug
auth backend are you seeing it return a full username?
there just returns (0 => 'johndoe', 1 => 'foo') with 0, 1... unrelated
to DB keys. So just applying my patch is impossible, but I wouldn't
throw it away: isn't what I'm supposing listUsers() to do the "better"
behaviour?
Cheers,
Thomas Gelf
Priority ⇒ 1. Low
New Attachment: Perms_UI-userkey.patch
Patch ⇒ Yes
Milestone ⇒
Queue ⇒ Horde Framework Packages
Summary ⇒ Perms_UI is storing Auth::listUsers() "Display Name"
Type ⇒ Bug
State ⇒ Unconfirmed
Doo', 'foo' => 'Foo Master', ...), Perms_UI is completely ignoring key
values as given by listUsers. This leads to problems (at least in my
special case) once you are going to use hasPermission() combined with
user-level permissions.
The attached patch changes Perms_UI to:
- store the key provided by listUsers() instead of the "Display Name"
- show the "Display Name" for permissions granted to existing users
- show "<username>" for unknown users (with quotes, helps to quickly
identify deleted users etc)
Please have a quick crosscheck with other Authentication modules, just
to be sure listUsers() is doing what I'm supposing it to do!
Best regards,
Thomas Gelf