Skip to content

[AAP-70261] Fix role user assignment - #164

Open
nickbhasin wants to merge 3 commits into
ansible:develfrom
nickbhasin:fix_role_user_assignment_devel
Open

nickbhasin wants to merge 3 commits into
ansible:develfrom
nickbhasin:fix_role_user_assignment_devel

Conversation

@nickbhasin

@nickbhasin nickbhasin commented Apr 20, 2026

Copy link
Copy Markdown
Contributor

Description

  • What is being changed?
    The hardcoded role name check is being replaced with a dynamic API endpoint mapping derived directly from the role definition's content_type attribute.
  • Why is this change needed?
    The module previously failed to assign custom roles that didn't start with specific prefixes.
  • How does this change address the issue?
    It correctly extracts the base object type from the content_type string (e.g., mapping shared.organization to organizations) to ensure the API request routes to the correct destination regardless of the role's name.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Test update
  • Refactoring (no functional changes)
  • Development environment change
  • Configuration change

Self-Review Checklist

  • I have performed a self-review of my code
  • I have added relevant comments to complex code sections
  • I have updated documentation where needed
  • I have considered the security impact of these changes
  • I have considered performance implications
  • I have thought about error handling and edge cases
  • I have tested the changes in my local environment

Testing Instructions

Prerequisites

Steps to Test

Expected Results

Additional Context

Required Actions

  • Requires documentation updates
  • Requires downstream repository changes
  • Requires infrastructure/deployment changes
  • Requires coordination with other teams
  • Blocked by PR/MR: #XXX

Screenshots/Logs

@nickbhasin nickbhasin changed the title Fix role user assignment [AAP-70261] Fix role user assignment Apr 20, 2026
@nickbhasin nickbhasin added the safe to test PR is safe to run integration tests label Apr 20, 2026
@nickbhasin nickbhasin closed this Apr 20, 2026
@nickbhasin nickbhasin reopened this Apr 20, 2026
@nickbhasin
nickbhasin marked this pull request as draft April 20, 2026 10:11
@nickbhasin
nickbhasin marked this pull request as ready for review April 21, 2026 07:14

@rohitthakur2590 rohitthakur2590 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets also fix this in 2.7 .

Comment thread tests/integration/targets/role_user_assignments_test/tasks/main.yml
@github-actions

Copy link
Copy Markdown

DVCS PR Check Results:

PR appears valid (JIRA key(s) found)

@nickbhasin

Copy link
Copy Markdown
Contributor Author

lets also fix this in 2.7 .
its working in 2.7

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

Labels

safe to test PR is safe to run integration tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants