5 Replies Latest reply on Oct 30, 2012 8:38 AM by Bill Robinson


    R V

      I have the need to update a description of a user after creation of that user. The only way to do this (that I found) is an unreleased API-command: RBACUser.setDescription.


      Could someone guide me how to use this command? Or could someone help me with a link which shows how to generally use these API-commands (of "Command Type: API", not the "normal" blcli-commands like RBACUser.createUser).



        • 1. Re: RBACUser.setDescription
          Bill Robinson

          I wrote a 'complex command' for another customer to do this. put the attached xml file in "


          there's a post at the top of this forum that describe using the unreleased commands a bit more. check that out and post back if you have more questions...

          • 2. Re: RBACUser.setDescription
            R V

            Thank you, Bill. That's exactly, what I needed. As additional info I post here my command sequence (as I use it in an nsh-script):


            blcli_execute RBACUser getDBKeyByName $USER
            blcli_execute RBACUser setDescription "$DESC"
            blcli_execute RBACUser update $USER


            and another version - slightly different:


            blcli_execute RBACUser findByName $USER
            blcli_execute RBACUser setDescription "$DESC"
            blcli_execute RBACUser update $USER


            So - as a general rule one can say:

            1. Use a command of type: Load

            2. Do what to do

            3. Use a command of type: Save



            • 3. Re: RBACUser.setDescription
              Bill Robinson

              yes - that sequence is correct when you are using the 'primitive' commands.


              some of the commands in the blcli are already 'complex' - most of the released ones - they handle the load and save for you.

              • 4. Re: RBACUser.setDescription
                R V

                Hi Bill and others


                today I had to set a description on a role. While searching for some information about how to update the changes, surprisingly I came across this/my old one


                I am wondering how one could figure out when an argument has to be set an when not.


                "blcli RBACUser update" needs, according to the blcli-help, some argument i.e. the user-object. That's the reason why I at first decided not to use this "update"-command.


                But then it shows up that this argument seems to be taken from the context.


                When I use "getDescription", which doesn't need an argument according to blcli-help, it seems to work much the same - just without the argument.


                But thinking about all this, the reason could be: getDescription is an API-command while update is a SAVE-command. That makes it meaningfull.


                So, finally - thank you for reading and maybe someone could use this text (that's why I don't just delete it )



                • 5. Re: RBACUser.setDescription
                  Bill Robinson

                  you need to use the update and pass in the user object after you make the change...



                  blcli_execute RBACUser findByName $USER

                  blcli_execute Utility storeTargetObject rbacUser

                  blcli_execute RBACUser setDescription "$DESC"

                  blcli_execute RBACUser update NAMED_OBJECT=rbacUser