Creating Global Role?

Wing Ming Chan's Avatar

Wing Ming Chan

Jul 07, 2014 @ 02:21 PM

I have been trying to create a global role using web services without success. I don't have any problem creating a site role, but it seems that creating a global role is not allowed. The last response does not include any useful information either.

Wing

  1. 1 Posted by Ryan Griffith on Jul 07, 2014 @ 02:57 PM

    Ryan Griffith's Avatar

    Hi Wing,

    I was able to confirm that creating a Global Role using Web Services is possible. What parameters are you are providing? In my test, I supplied the following create paramaters:

    "authentication" => array(
        "username" => "",
        "password" => ""
    ),
    "asset" => array(
        "role" => array(
            "name" => "test-global",
            "roleType" => "global",
            "globalAbilities" => array()
        )
    )
    

    Can you confirm you are supplying the global role type along with the globalAbilities parameter? Also, if you are providing parameters, make sure you are passing valid global-abilities.

    Please let me know if you have any questions.

    Thanks!

  2. 2 Posted by Wing Ming Chan on Jul 07, 2014 @ 03:07 PM

    Wing Ming Chan's Avatar

    Ryan,

    It's my fault. While I was testing site role creation, I set siteAbilities to an stdClass object and globalAbilities to NULL. But then I forgot to switch when I tried to create a global role. globalAbilities was still set to NULL. With this property set properly, my code works.

    Thanks,
    Wing

  3. 3 Posted by Ryan Griffith on Jul 07, 2014 @ 03:12 PM

    Ryan Griffith's Avatar

    Not a problem at all, Wing. I am glad to hear you were able to get your code working.

    I'm going to go ahead and close this discussion, please feel free to comment or reply to re-open if you have any additional questions.

    Have a great day!

  4. Ryan Griffith closed this discussion on Jul 07, 2014 @ 03:12 PM.

Discussions are closed to public comments.
If you need help with Cascade CMS please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac