Skip to content

Fix: event commercial permissions in non-admin flow - #3803

Merged
hennevogel merged 3 commits into
openSUSE:masterfrom
RedZapdos123:fix-commercial-auth
Jun 18, 2026
Merged

Fix: event commercial permissions in non-admin flow#3803
hennevogel merged 3 commits into
openSUSE:masterfrom
RedZapdos123:fix-commercial-auth

Conversation

@RedZapdos123

@RedZapdos123 RedZapdos123 commented May 31, 2026

Copy link
Copy Markdown
Contributor

Description:

Issue #3143 reported that organizers could edit a proposal in the non-admin flow but hit AccessDenied when creating a commercial for that proposal.

This PR updates Ability so organizers and CFP team members can manage event commercials for conferences where they already have proposal-management access in non-admin views.

It also adds regression tests that cover the relevant ability rules.

Closes #3143.

Checklist:

  • I have added relevant regression test cases for this fix.
  • I have run linting checks using bundle exec rubocop app/models/ability.rb spec/ability/ability_spec.rb.
  • I have run focused tests using bundle exec rspec spec/ability/ability_spec.rb.

Additional validation:

  • Reproduced the bug on a clean clone in WSL: organizers could manage the proposal event but could not create an event commercial.
  • Verified the fix on the patched clone in WSL: organizers could create the event commercial.
  • Ran bundle exec rake spec:ability in WSL.

Before the fix (when signed in as an organizer):

image

After the fix (when signed in as an organizer):

image

Non-admin proposal flow uses Ability, not AdminAbility, so organizers and CFP users could edit proposals but could not create event commercials.

Closes openSUSE#3143.

Signed-off-by: Mridankan Mandal <xerontitan90@gmail.com>
@RedZapdos123
RedZapdos123 marked this pull request as ready for review May 31, 2026 15:56
@RedZapdos123 RedZapdos123 changed the title Fix event commercial permissions in non-admin flow Fix: event commercial permissions in non-admin flow May 31, 2026
Comment thread spec/controllers/commercials_controller_spec.rb Outdated
RedZapdos123 and others added 2 commits June 18, 2026 00:24
@hennevogel

Copy link
Copy Markdown
Member

What does the last commit have to do with this PR?

@RedZapdos123
RedZapdos123 force-pushed the fix-commercial-auth branch from dc4a79d to de4400a Compare June 18, 2026 13:12
@hennevogel
hennevogel merged commit cb5ad73 into openSUSE:master Jun 18, 2026
14 of 15 checks passed
@hennevogel

Copy link
Copy Markdown
Member

@RedZapdos123 thanks Mridankan :)

@RedZapdos123

RedZapdos123 commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

What does the last commit have to do with this PR?

Yes, it was out of scope for this PR, so I had reverted it.

I had added it to address a failing spec/features/proposals_spec.rb check on this branch, where Selenium hit a stale node error during proposal confirmation. I moved that commit's changes for test stabilization to #3808 (based on issue #3807).

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.

Access denied when organizer adds commercial

3 participants