[Freeipa-devel] [PATCH 0071] Display token type when viewing token
Nathaniel McCallum
npmccallum at redhat.com
Thu Oct 16 21:37:21 UTC 2014
On Thu, 2014-10-16 at 17:35 +0200, Martin Kosek wrote:
> On 10/15/2014 06:32 PM, Nathaniel McCallum wrote:
> > When viewing a token from the CLI or UI, the type of the token
> > should be displayed.
> >
> > https://fedorahosted.org/freeipa/ticket/4563
>
> Adding objectclass to default_attributes is unprecedented and something we
> should not do before release. It would also put objectclass attribute in
> default otptoken-* operations.
>
> What I would do in this case is to
> - keep default_attributes as is
> - add 'objectclass' to attrs_list in pre_callback
> - do whatever you already do with it in post_callback
> - remove the objectclass if it was not called for explicitly, e.g.:
>
> if not options.get('all', False) or options.get('pkey_only', False):
> entry_attrs.pop('objectclass', None)
>
> This approach is used for example in idrange.py so I would stick with it (I am
> not saying it is pretty, I am just saying our API should give consistent output).
Fixed and tested.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-npmccallum-0071.1-Display-token-type-when-viewing-token.patch
Type: text/x-patch
Size: 5572 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20141016/0efc0211/attachment.bin>
More information about the Freeipa-devel
mailing list