On 17/01/17 12:16, Peter Fern wrote:
On 17/01/17 21:48, David Kupka wrote:
Ok, your plugin is not really a plugin but that should not be a problem.
To make it work:
1) replace "from ipalib.plugins.user import user" with "from
ipaserver.plugins.user import user"
2) make sure "user_mailalternateaddress.py" is also in ipaserver/plugins/
3) restart httpd
Thank you, that gets the web UI working as expected, but I seem to be
missing the CLI switch.
That is probably caused by client API schema cache that was also added
in 4.4. Once the schema is downloaded and stored in cache it's validity
is not checked for the next hour.
You can either force the check to be performed immediately:
$ ipa -v -e force_schema_check=1 user-add --help
or remove the cache:
$ rm -r ~/.cache/ipa/
You can find more about this feature and related changes on its design
page [1]
I'm also adding an objectclass to the default userobjectclasses (and
updating existing users) in my install script, but it looks like maybe I
can use the 'updates' mechanism for this, is that right? If so, is that
mechanism documented anywhere?
Adding objectclass or generally any attribute to many entries (users
tends to be numerous) may take really really long and is not a good
idea. It's better to add such objectclass on demand when the attribute
is added to the entry for the first time.
But I agree with Alexander, in longer run it would be much better if you
create and package proper plugin.
[1] http://www.freeipa.org/page/V4/API_Compatiblity
--
David Kupka
--
Manage your subscription for the Freeipa-users mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-users
Go to http://freeipa.org for more info on the project