Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting ownership of a Service seems to require too many product features #22985

Open
jrafanie opened this issue Apr 10, 2024 Discussed in #22965 · 3 comments
Open

Setting ownership of a Service seems to require too many product features #22985

jrafanie opened this issue Apr 10, 2024 Discussed in #22965 · 3 comments
Assignees

Comments

@jrafanie
Copy link
Member

Discussed in https://github.com/orgs/ManageIQ/discussions/22965

Originally posted by uejo March 28, 2024
Hello, I have a use case where a user wants to move his service to another group in the same tenant. The only way I managed to accomplish this seems to require unnecessary Product Features.
Steps I have taken so far:

  • create a new tenant under "My Company"
  • create a copy of the EvmRole-user_self_service role and add the following Features as seen in the picture below:
    I also had to set the Access Restriction to "None" in the service role, otherwise I am also not able to see other groups.
    The Set Ownership seems necessary to even have the Button available (at least in the new UI, in the self service UI the button option is always available.
    The Groups View is necessary otherwise you get API error permission denied on the /api/groups endpoint

image

  • create 2 groups, assign both the newly created tenant and the role above.
  • create a service as user1 (I added a Generic Service in the default Catalog)

Now I can select the 2nd group
image
But I have permissions to create and delete Tenants, of course I don't want that.
image

But as soon as I remove the Tenant permissions product feature, and it doesn't matter if you remove Modify or Operate, removing one of those is enough, I can not see any other groups anymore:
image

So how can I accomplish what I'm trying to do? I am using the self_service UI which has the Button "Set ownership" but as for now it seems I cant really use that feature.
image

@jrafanie jrafanie added the bug label Apr 10, 2024
@jrafanie jrafanie self-assigned this Apr 10, 2024
@jrafanie
Copy link
Member Author

From: https://github.com/orgs/ManageIQ/discussions/22965#discussioncomment-9051032

So, I tracked it down to this code:

scope = scope.with_groups(user.miq_group_ids) unless role&.tenant_admin_user?

We're only showing users and groups outside your own group if you're considered a tenant admin or super admin which is also a tenant admin.

This is why it works when you give your user all permissions under Access control -> Tenants.

I'm not sure how to enable the ability to set ownership outside of your group for a user with less permission.

@jrafanie jrafanie changed the title Setting ownership of a Service seems to require to many product features Setting ownership of a Service seems to require too many product features Apr 26, 2024
@miq-bot miq-bot added the stale label Jul 29, 2024
@miq-bot
Copy link
Member

miq-bot commented Jul 29, 2024

This issue has been automatically marked as stale because it has not been updated for at least 3 months.

If you can still reproduce this issue on the current release or on master, please reply with all of the information you have about it in order to keep the issue open.

1 similar comment
@miq-bot
Copy link
Member

miq-bot commented Nov 1, 2024

This issue has been automatically marked as stale because it has not been updated for at least 3 months.

If you can still reproduce this issue on the current release or on master, please reply with all of the information you have about it in order to keep the issue open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants