Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • timgrove 28 posts 61 karma points
    Apr 20, 2010 @ 18:50
    timgrove
    0

    Courier Allowed Users

    I am having some troubles trying to figure out the right settings for the courier.config with regards to users, if anyone can shed some light on this, it would be greatly appreciated.

    I have Server A (staging) and Server B (production). Content from Server A gets transfered to Server B

    I have a user on Server A that has a userId of 4. 

    I added <user>4</user> to the <allowedUsers> to the courier.config on Server A.

    I log into umbraco on Server A, and transfer content from context menu, and click the "transfer" button on the dialog window and get the following application error:

    System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> Umbraco.Courier.BusinessLogic.Exceptions.UnauthorizedClientException: User with id '-1' is not allowed to use Courier. To authorize this user for Courier, add it to the list of authorized users in the courier.config file
      at Umbraco.Courier.Webservices.Helper.AuthorizeClient(String login, String password)
      at Umbraco.Courier.Webservices.Messenger.ValidateDependency(String dependencyKey, Object validationObject, String login, String password)
      --- End of inner exception stack trace ---

    I then added <user>4</user> to the <allowedUsers> to the courier.config on Server B.

    I have also double checked that user's and the user type's permissions, and those are checked to Transfer.

    Still getting the same error.

    My questions are:

    1.) Does anyone one know why I would be getting this error, or what I can check and the error is stating "User is id '-1'", which is not the userId I am logged in as?

    2.) Which courier.config should i be configuring, Server A or Server B or both?

    3.) There are 3 points of permissions for Courier: <allowedUsers><user></user></allowedUsers>; <contextMenu><userType></userType></contextMenu>; and the Default Permissions on the User Type.  Which one is looked at first for adding the context menu item? and which one overrides which?

    We are using Umbraco 4.0.3 with Courier 1.1.1.

    Thanks in advance!

     

  • Niels Hartvig 1951 posts 2391 karma points c-trib
    Apr 20, 2010 @ 22:53
    Niels Hartvig
    0

    I'll take a look tomorrow morning when I get into the office!

  • Niels Hartvig 1951 posts 2391 karma points c-trib
    Apr 21, 2010 @ 10:02
    Niels Hartvig
    0

    Does the user exists in both environments? And does it have the same combination of user/pw?

    If not then this is the error message you'll get. The reason that it is a bit misguiding is that the newer versions of Umbraco returns "-1" as the user id instead of null if the user isn't authenticated. This causes the internal error handling in Courier to get a bit confused as it expects "null" when credentials are wrong. I've logged this as a bug and it'll be fixed for Courier 1.2.

  • timgrove 28 posts 61 karma points
    Apr 21, 2010 @ 15:11
    timgrove
    0

    The user does not exist in both environments, I was not aware that the user had to be in both enviroments. Thanks for helping me with that.

    I would assume all the user permissions on the production side are being validated when transferring?  Why I am asking that is, there are several layers of content owners/users in the staging environment, but very limited in the production environment.  Is it possible to have the user in staging, transfer the content successfully through courier, but that user account on the production side is restricted login access?

    Thanks again Niels!

  • Niels Hartvig 1951 posts 2391 karma points c-trib
    Apr 21, 2010 @ 20:23
    Niels Hartvig
    0

    User permissions aren't validated, which in your case is a good thing then ;-)

  • timgrove 28 posts 61 karma points
    Apr 22, 2010 @ 16:45
    timgrove
    0

    Thanks for the help!

     

Please Sign in or register to post replies

Write your reply to:

Draft