Skip to content

Conversation

ryanmelt
Copy link
Member

closes #2455

@codecov
Copy link

codecov bot commented Oct 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.55%. Comparing base (971ae94) to head (10a8063).
⚠️ Report is 43 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2458      +/-   ##
==========================================
- Coverage   79.56%   79.55%   -0.01%     
==========================================
  Files         658      658              
  Lines       50360    50405      +45     
  Branches      736      736              
==========================================
+ Hits        40067    40100      +33     
- Misses      10213    10225      +12     
  Partials       80       80              
Flag Coverage Δ
python 81.68% <ø> (-0.06%) ⬇️
ruby-api 84.57% <ø> (-0.03%) ⬇️
ruby-backend 82.75% <ø> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sonarqubecloud
Copy link

@ryanmelt
Copy link
Member Author

This was a timing issue where mounted was finishing before created when waiting on role API calls.

Comment on lines +1124 to +1125
this.editor.setReadOnly(true)
this.editor.renderer.$cursorLayer.element.style.display = 'none'
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you remove all the other places where this is set based on readOnlyUser (e.g. lines 1242-1245)? I'm not worried about thrashing, more just code maintainability

Copy link
Member Author

Choose a reason for hiding this comment

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

It needs both. The watcher is a noop if the editor doesn't exist yet, and in that case you still need the later lines.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, I see

@ryanmelt ryanmelt merged commit 8859f8f into main Oct 20, 2025
30 of 33 checks passed
@ryanmelt ryanmelt deleted the fix_scriptrunner_custom_roles_readonly branch October 20, 2025 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect read-only behavior in ace editor when using custom (non-default) roles with script_* permissions

2 participants