Inadvertent clearing of all capabilities/capabilitySets when editing roles

Description

Description:

It’s possible to unintentionally remove all capabilites/capbilitySets from a role if you edit the role and save the changes prior to the capabilities/capabilitySets fully loading.

Steps to reproduce:

  1. Create an Authorization Role and checkmark some capabilities

  2. Save and Close

  3. Actions>Edit to edit that Role

  4. Quickly make a change to the name or description, then click Save and Close *before the capabilities have loaded*

Expected behavior:

The set of capabilities/capabilitySets associated with the role remain unchanged, but the name/description changes are applied to the role.

Actual behavior:

The adjustments to name / description are saved, but *all previously checkmarked capabilities are un-checkmarked* resulting in a role with zero capabilities/capabilitySets.

CSP Request Details

None

CSP Rejection Details

None

Potential Workaround

None

Attachments

2

Checklist

hide

Activity

Show:

Yauhen Viazau July 18, 2024 at 4:49 PM

Still active on FSE Dry run 1 after Q CSP1 update

Aidyn Zhakizhanov July 17, 2024 at 6:29 AM

I think it is happening because of the issue .
The bug will be fixed once mentioned ticket is resolved. I’ll take the one ASAP

Craig McNally July 16, 2024 at 6:39 PM

OK I was able to test this and initially it looks good, but there’s definitely some strange behavior here. Let me know if you’d like to handle this in scope of this bug, or if we want a separate one.

The problem is, after editing the role description and saving quickly (before the capabilities load), the role details show 0 capabilities. When I edit the role again I see the capabilities are indeed still checked. However, if I close out of the edit form, the role details still don’t show any capabilities, even with a page refresh. Finally, when I edit the role for a third time, no applications or capabilities are selected! See this video:

/

Craig McNally July 12, 2024 at 8:28 PM

Unable to verify on evrk2 due to . Will retry once unblocked.

Yauhen Viazau July 10, 2024 at 9:56 AM

Re-tested on evrk2 after fix deployment - works as expected

Tested with network speed throttling to trigger the issue on evrk2.
Even when role name is updated and role saved before capabilities are loaded, capabilities are not changed in saved role. See examples:

- this issue is still reproducible on FSE Dry run 1, and this fix needs to be deployed and tested there

Done

Details

Assignee

Reporter

Priority

Story Points

Sprint

Development Team

Eureka

Fix versions

RCA Group

TBD

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs
Created July 3, 2024 at 9:22 PM
Updated February 13, 2025 at 11:31 PM
Resolved July 24, 2024 at 12:27 PM
TestRail: Cases
TestRail: Runs