Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Dec 10 2019 16:54
    Travis ManageIQ/manageiq-graphql (ivanchuk-2) passed (1405)
  • Dec 10 2019 16:36

    simaishi on ivanchuk-2

    (compare)

  • Nov 21 2019 19:10
    mfeifer labeled #32
  • Nov 21 2019 19:10
    mfeifer unlabeled #32
  • Nov 21 2019 19:10
    mfeifer labeled #32
  • Nov 08 2019 22:05

    Fryguy on master

    Optionally symlink spec/managei… Merge pull request #84 from agr… (compare)

  • Nov 08 2019 22:05
    Fryguy closed #84
  • Nov 08 2019 22:05
    Fryguy labeled #84
  • Nov 08 2019 22:05
    Fryguy milestoned #84
  • Nov 08 2019 22:05
    Fryguy assigned #84
  • Nov 08 2019 13:51
    miq-bot commented #84
  • Nov 08 2019 13:50
    agrare synchronize #84
  • Nov 08 2019 13:39
    agrare edited #84
  • Nov 08 2019 13:37
  • Nov 08 2019 13:28
    agrare opened #84
  • Nov 06 2019 17:47
    simaishi assigned #83
  • Nov 06 2019 17:47
    simaishi milestoned #83
  • Nov 06 2019 17:47
    simaishi labeled #83
  • Nov 06 2019 17:47

    simaishi on ivanchuk

    Test ruby 2.5.5, see: https://g… Merge pull request #83 from d-m… (compare)

  • Nov 06 2019 17:47
    simaishi closed #83
JVue
@JVue
@himdel I’m posting exactly what the doco says:
{
  "action" : "set_current_group",
  "resource" : {
    "group" : { "description" : "EvmGroup-auditor" }
  }
}
use case - when a user consumes our internal API that talks to MIQ, they don’t have to worry about logging into miq first and changing their group to one that has the proper role first… our API will automatically change their current group to the proper one then revert back to their last group when done
(for permissions, we’ll use admin creds to set their group)
i think i tried changing my own group under my own creds and got the same message as above earlier
JVue
@JVue
yeah just tried again and got the same response as above… just trying to switch between groups that i’m a part of
{
  "action" : "set_current_group",
  "resource" : {
    "group" : { "description" : "EvmGroup-auditor” } <——— insert group name you want to switch to
  }
}
Martin Hradil
@himdel
@JVue What SUI is sending is slightly different...
        'action': 'set_current_group',
        'current_group': {'id': group.id}
which would probably explain that "Cannot set current_group - Must specify a current_group"
(maybe sending description isntead of id works too, I think the problem is with .resource.group vs just .current_group)
JVue
@JVue
@himdel let me give that a shot…
JVue
@JVue
Awesome! it works.. ( might want to update the doco to call out group ID only (as opposed to description or href) ) thanks much @himdel ! (http://manageiq.org/docs/reference/latest/api/reference/users)
Martin Hradil
@himdel
yay! :) Cc @abellotti ^^ (i'm not sure how API docs are generated, or from where)
Martin Hradil
@himdel
( => addressed in ManageIQ/manageiq_docs#1187 )
@himdel thanks
Martin Hradil
@himdel
thank you :)
Joe VLcek
@jvlcek
I tested with "action" : “edit"
Martin Hradil
@himdel
aah
Joe VLcek
@jvlcek
Testing now with "action" : "set_current_group”,
But it’s not working :(
JVue
@JVue
did “action” : “edit” work?
Joe VLcek
@jvlcek
yes
@JVue this example works:
JVue
@JVue
ok thanks @jvlcek
Joe VLcek
@jvlcek
@himdel can you please point me to where the SUI does this?
Joe VLcek
@jvlcek
@himdel thank you
JVue
@JVue
@jvlcek I tried the edit method and it returned:
{
    "error": {
        "kind": "bad_request",
        "message": "Cannot update attributes other than password, email, settings for the authenticated user",
        "klass": "Api::BadRequestError"
    }
}
my id is currently set to a group that has very restricted permissions …(not sure if this matters… it shouldn’t imo)
Joe VLcek
@jvlcek
I think that is your issue with that one.
JVue
@JVue
I changed my ID to admin role and it worked now
Joe VLcek
@jvlcek
:thumbsup:
JVue
@JVue
the set_current_group doesn’t appear to have this limitation tho
(the intent was to be able to change the user group regardless of which group is currently selected for them)
Joe VLcek
@jvlcek
@JVue I will investigate
JVue
@JVue
awesome.. thanks @jvlcek
Alberto Bellotti
@abellotti
@himdel re: doc, nothing fancy or automated unfortunately. Manual process of going through PRs in a release and creating one monster PR in docs.
Joe VLcek
@jvlcek
@JVue set_current_group can only be used to set the current group to a group the user already belongs to and set_current_group can only be used by the authenticated user
So you can not use admin to set_current_group for my_happy_user_42
And my_happy_user_42 needs to already belong the group being set at the current group.
JVue
@JVue
yep… got all that.
Joe VLcek
@jvlcek
But href, id and description can each be used to specify the current group for both edit and set_current_group
I put together 6 examples
JVue
@JVue
ok