On 9.6.2015 12:30, Petr Spacek wrote:
> On 8.6.2015 21:37, Drew Erny wrote:
>> Hi, all,
>> I'm going to start working on the Community Portal milestone this week. The
>> first thing I'm noticing is that for almost all of the community portal,
>> has to be some way for the IPA server to send email, which right now isn't
>> possible. It has been brought to my attention, however, that there is an
>> existing ticket (https://fedorahosted.org/freeipa/ticket/1593) that includes
>> email under its purview. I don't want to write a bunch of code that'll get
>> tossed when work starts on the notification system if I don't have to, but I
>> will if I must.
>> I need a little bit of guidance. Is working on code to let the IPA server
>> email to users a good place to start chipping at this?
> I would recommend you to base your implementation on the generic principle
> sketched in https://fedorahosted.org/freeipa/ticket/1593 .
> Let's take https://fedorahosted.org/freeipa/ticket/3613 as an example:
> [RFE] Provide a self service enrollment capability with admin approval and
> notification workflow
> 1. User fills-in a web form for account registration.
> 2. A new user object in staging area is created.
> 3. FreeIPA framework calls a D-Bus method
> com.redhat.ipa.hook_user_self_registration (or something like that)
> This method/service/how is it called can be then provided by arbitrary script
> which can be connected to D-Bus using Oddjob.
> This will lift the burden of e-mail processing from you and will allow users
> to do anything with the data passed to hooks.
> I hope this helps.
Speaking about D-Bus, interns in Brno successfully used this tutorial a month
I do not remember why but we slightly modified the code for consumer to use
Interface() constructor instead of get_dbus_method():
infopipe_obj = bus.get_object("org.freedesktop.sssd.infopipe",
ifp = dbus.Interface(infopipe_obj,
# call the method remotely
result = ifp.GetUserAttr(username, ["ipaSshPubKey"])
So, if you encounter a mysterious failure you might want to try this variant :-)
FreeIPA framework should act as 'consumeservice.py' and oddjob will implement
most of 'myservice.py' for you.
Let us know if you have any questions!
Manage your subscription for the Freeipa-devel mailing list:
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code