ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Safecracker - You are not authorized to perform this action

October 11, 2011 3:58am

Subscribe [4]
  • #1 / Oct 11, 2011 3:58am

    Henrik Eklund

    34 posts

    Hi,

    We use Safecracker… EE 2.2.2. Guests are allowed to post entries. Addons used in Safecracker form: Matrix

    Some users have problems to register via the form, http://ny.windindustry.se/index.php/registrering. They fill in all fields, and when they press the submit form they receive an error message saying ‘You are not Authorized to perform this action’ (see attachment 1.jpg). The settings applied to the member group (see attachment 2.jpg):

    We have tested on different computers and browsers, and havent been able to reproduce the same problem 😕

    Simplified template:

    {exp:safecracker channel="registrering" logged_out_member_id="4" return="registrering/info/URL_TITLE" URL_TITLE="{segment_3}"}
      
      <label class="default"><span>Företagsnamn <span class="obl">*</span></span><input type="text" name="title" id="title" value="{title}" /></label>
      <label class="default"><span>Organisationsnummer <em class="help">(anges som xxxxxx-xxxx)</em> <span class="obl">*</span></span><input type="text" name="organisationsnummer" id="organisationsnummer" value="{organisationsnummer}" /></label>
      <label class="default"><span>Gatuadress huvudkontor <span class="obl">*</span></span>{field:gatuadress}</label>
      <label class="default"><span>Postnummer <span class="obl">*</span></span>{field:postnummer}</label>
      <label class="default"><span>Postort <span class="obl">*</span></span>{field:postort}</label>
      <label class="default"><span>E-post <span class="obl">*</span></span>{field:epost}</label>
      <label class="default"><span>Telefon <span class="obl">*</span></span>{field:telefon}</label>
      <label class="default"><span>Hemsida <em class="help">(<a href="http://www.exempel.se">http://www.exempel.se</a>)</em></span>{field:hemsida}</label>
      <label class="default"><span>Logotyp <em class="help">(filformat JPG, PNG eller GIF max 3MB)</em></span>{field:logotyp}</label>
      <label class="default"><span>Etableringsår <em class="help">(t ex 1987)</em> <span class="obl">*</span></span>{field:etableringsar}</label>
      <label class="default"><span>Antal anställda <span class="obl">*</span></span>{field:antal_anstallda}</label>
      <label class="default"><span>Omsättning föregående år <em class="help">(MSEK)</em></span>{field:omsattning_foregaende_ar}</label>
      <label class="default"><span>Företagsprofil / Produkter och tjänster <em class="help">(max 200 ord – svenska)</em> <span class="obl">*</span></span>{field:foretagsprofil}</label>
      <label class="default"><span>Företagsprofil / Produkter och tjänster <em class="help">(max 200 ord – engelska)</em> <span class="obl">*</span></span>{field:foretagsprofil_en}</label>
      <label class="matrix"><span>Ange län och kommun(er) där ditt företag finns etablerat <span class="obl">*</span>
    <em class="helpsub">Huvudkontor samt ev andra områdekontor</em></span>{field:geografi}</label>
      <button type="submit" class="submit">Skicka formulär</button>
    
    {/exp:safecracker}

    Any clues on this?

    Thanks!

    /Henrik

     

  • #2 / Oct 11, 2011 4:04pm

    Kevin Smith

    4784 posts

    Hi Henrik,

    The first thing I would check is to see which fieldtype you’re using for the file field. If you’re not using SafeCracker File, I would highly recommend it.

    In your tests, have you tried the form while logged out? It sounds like the issues your guests are having might only appear to a person submitting the form while logged out.

    Check the permissions of the user with ID 4 to see if that member has the ability to upload files to the upload directory for this form.

  • #3 / Oct 11, 2011 4:42pm

    Henrik Eklund

    34 posts

    Hi Kevin and thanks for your answer!

    Hi Henrik,

    The first thing I would check is to see which fieldtype you’re using for the file field. If you’re not using SafeCracker File, I would highly recommend it.

    We use the SafeCracker File

    In your tests, have you tried the form while logged out? It sounds like the issues your guests are having might only appear to a person submitting the form while logged out.

    In all our tests, we have been logged out…

    Check the permissions of the user with ID 4 to see if that member has the ability to upload files to the upload directory for this form

    Yes, they have permission to upload files to the upload directory…

    The strange thing is that approximately the 9 out of 10 users successfully complete the registration. Could it be something with the firewall for those who get the error?

    Thanks!

    /Henrik

  • #4 / Oct 12, 2011 11:15am

    Kevin Smith

    4784 posts

    Is this a server-side firewall? If so, could you go into a bit more detail about it. And speaking of server config, would you happen to be on a server that’s using load-balancing or on a network that might be switching IPs dynamically?

  • #5 / Oct 12, 2011 11:30am

    Henrik Eklund

    34 posts

    I’m just guessing it’s ther users’ firewalls that are the problem 😉 The visitors who have received the message sits in various places in the country. So I have no way to check each visitor’s network configuration. Another possible reason could be that those receiving the error does not accept cookies or to hide their IP address.

    If you look in the user guide, it says:

    “...When accessing certain locations within the control panel ExpressionEngine returns the following error message: “You are not authorized to perform this action”.

    ... By default, ExpressionEngine expects user’s browsers to send a valid IP address and User Agent information”

    I dont know if it is the same with Safecracker. I feel powerless over this issue ...

    Thanks!

    /Henrik

  • #6 / Oct 12, 2011 3:56pm

    Kevin Smith

    4784 posts

    Hmm… this is definitely a weird one. So is it 9 out of every 10 users or 9 out of every 10 times? Just trying to nail down whether it happens to the same 10% of users consistently or if it happens 10% of the time to everyone.

  • #7 / Oct 12, 2011 4:04pm

    Henrik Eklund

    34 posts

    Thanks!

    It happens to the same 10% of users consistently. I agree this is a really, really weird one.

    /Henrik

  • #8 / Oct 12, 2011 4:06pm

    ahmad saad

    364 posts

    what are the settings applied to the member group in Channel Posting Privileges

  • #9 / Oct 12, 2011 4:10pm

    Henrik Eklund

    34 posts

    what are the settings applied to the member group in Channel Posting Privileges

    See attachment.

    Thanks!

    /Henrik

  • #10 / Oct 12, 2011 4:15pm

    Kevin Smith

    4784 posts

    So for the same 10% users that are experiencing problems every time they try to use it, can you narrow things down into a pattern? Are they all using IE, dialup, Mac/Windows, etc? Is there something about that group that distinguishes them from the rest?

  • #11 / Oct 12, 2011 4:19pm

    Henrik Eklund

    34 posts

    I have to dig deeper into their environment. All I know is that some are in a network environment that is quite strict (governmental activities). I will talk to their network engineer tomorrow.

    Thanks!

  • #12 / Oct 12, 2011 4:19pm

    ahmad saad

    364 posts

    that’s look all right

    I try the form and it work properly I don’t see any properly no error message

  • #13 / Oct 12, 2011 4:27pm

    Henrik Eklund

    34 posts

    that’s look all right

    I try the form and it work properly I don’t see any properly no error message

    Yes, that’s the problem ... that not all get the error 😉

    Thanks for trying!

    /Henrik

  • #14 / Oct 12, 2011 4:28pm

    Kevin Smith

    4784 posts

    Check in with them and let us know what you find, Henrik. Thanks for your patience on this. Issues that are hard to replicate can be very frustrating to fix!

  • #15 / Oct 12, 2011 4:34pm

    Henrik Eklund

    34 posts

    I’ll let you know… Thanks for your help so far.

    /Henrik

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases