Usage Scenario: Displaying the Comment Form to Logged-in Users

Ensure that only logged-in users can leave comments in the application. Users who are not logged in cannot see the comment form and are shown an informational message instead.

  • Element: Comment Form component
  • Trigger: Runs automatically when the page is loaded or when the comment form needs to be displayed.
  • Action: Authorisation → Is Logged In

Process

If the user is logged in:

The comment form is displayed.The user's name, email address, and other information can be automatically populated in the form.The fields required to submit a comment (text box, submit button, etc.) become active.

  1. If the user is not logged in:
    • The following message is displayed instead of the comment form:
    • ‘Please log in to post a comment.’
    • (Optional) A ‘Log In’ button or redirect link can be displayed immediately below.
    • When the user returns to the page after logging in, the form appears automatically.

This scenario is an example of using the Is Logged In action for content visibility control, other than page redirection. Unauthorised users are not redirected directly; they are informed and encouraged to log in. This approach allows redirection without interrupting the user experience, especially for public content.