Search

I have Members installed with 2 roles public (normal visitor) and membre (registered user).

I want to be able to send e-mails to membre(s) using the front-end as an administrator (the primary user) being only connected as such. I created a section for the mails (I want members to be able to retrieve them on the site), an event and a page. The page is hidden to the visitors and has the admin type. The event is filtered "admin only". At the moment I don't worry about really sending the email (which I can do using ETM and I already did with the contact form). It is just a matter of creating an entry in the section.

When submitting the form, I am told I am not allowed to do that. To be able to submit the e-mail I have to allow public to trigger the event. Is this what I should expect? Rather surprising!

No, Members does not interfere with Symphony authors.

What is the exact error?

Can you try and debug the event response?

Hi michael-e,

Here are debug outputs. I am only logged as primary user (the one I declared as administrator in the installation process) . The form is intended for use by this primary user.

First output: with public role not allowed to create "Info Lettre" (write-info-lettre)

<events>

    <member-login-info logged-in="no" />

    <write-info-lettre result="error">

        <filter name="permission" status="failed">You are not authorised to perform this action.</filter>

        <post-values>

            <sujet>An example</sujet>

            <corps>An example of info letter</corps>

        </post-values>

        <message message-id="400">Entry encountered errors when saving.</message>

    </write-info-lettre>

</events>

Second : with public role allowed to create new "Info Lettre"

<events>

    <member-login-info logged-in="no" />

    <write-info-lettre result="success" type="created" id="208">

        <filter name="permission" status="passed" />

        <message message-id="100">Entry created successfully.</message>

        <filter name="etm-info-lettre" status="passed" total="3" sent="3" />

        <post-values>

            <sujet>An other example</sujet>

            <corps>An other example with publc allowed to create Info Lettre</corps>

        </post-values>

    </write-info-lettre>

</events>

Here is the logged-in-author info where I blanked the admin username with x

<logged-in-author>

    <author id="1" user-type="developer" primary-account="yes">

        <username>xxxxxxxxxx</username>

    </author>

</logged-in-author>

Thank you for help.

Yes, this is expected behaviour. When using Members, every event has permissions based on the Member Roles. If no Member is logged in, the default Role ("public") will be used.

However, I don't see the "Admin only" filter in your debug output. Are you sure that it is active?

Regarding permissions, I see two possibilities:

  1. Use Members only. Create a Role "Power" or similar (just for you) and only allow the event for this role. Of course, you will have to be logged in with your Member account in order to send emails.
  2. Allow all Members to trigger the event, but use the "admin only" filter. In this case please double-check that it works fine. (You might temporarily remove the admin page type to test this. You should verify that you can not trigger the event if you are logged out as admin.)

Yes, right. I had removed the "admin only"

I opted for solution 2 that I prefer in order to keep only one login. It's fine. "admin only" prevents "public" to trigger the event. In addition I will restore type "admin" for the page.

Thanks a lot.

You're welcome.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details