Ticket #651 (closed Defect: fixed)

Opened 6 years ago

Last modified 6 years ago

client side plugin developers can not react to a webclient-login

Reported by: Malte Owned by:
Priority: Minor Milestone: Release 4.3
Component: DeepaMehta Standard Distribution Version: 4.2
Keywords: Cc: jri
Complexity: 3 Area: Application Framework / API
Module: deepamehta-webclient

Description

.. e.g. to render a custom searchmode-widget just after a "visitor" was successfully authenticated as a "user" (without an application reload).

Change History

comment:1 Changed 6 years ago by jri

You CAN react on login/logout at client-side by listening to the "logged_in" and "logged_out" events respectively:

    dm4c.add_listener("logged_in", function(username) {
        ...
    })

    dm4c.add_listener("logged_out", function() {
        ...
    })

Is this what you're looking for?

comment:2 Changed 6 years ago by Malte

  • Status changed from new to closed
  • Resolution set to fixed

Yes, exactly.

I thought this is an issue cause I could not easily find these events declareed in the webclient.js (under my search for "fire_event(" but next time I will search for "fire_events" across all modules and then I won't miss up on what is already possible.

Thanks!

comment:3 Changed 6 years ago by jri

"fire_event(" is supposed to be the correct search. When searching accross all modules you'll can see the login/logout events are not fired by the Webclient but by the Access Control module.

Another way is to consult the Webclient's /resources/docs/events.txt file. All client-side events are documented there. I try to always keep this documentation up-to-date.

Cheers!

Note: See TracTickets for help on using tickets.