Skip to content

Conversation

harikrishna-patnala
Copy link
Contributor

@harikrishna-patnala harikrishna-patnala commented Aug 20, 2024

Description

This PR fixes the issue #9413

The original fix was to allow user to do actions (update, restart, delete) on the network only if the user owns the network and if user role is of Admin or domain admin.

If the network belongs to a project then the actions can be allowed as it belongs to only to that project.

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • build/CI
  • test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

Before fix with a network in project
Screenshot 2024-08-20 at 12 11 16 PM

After fix with a network in project
Screenshot 2024-08-20 at 12 11 50 PM

How Has This Been Tested?

  1. Create an account of type user
  2. Login with that user
  3. Create a project and switch to that project
  4. Create a new network in that project
  5. Before fix user won't be able to do any actions on that network, after fix it is allowed.

@harikrishna-patnala
Copy link
Contributor Author

@blueorangutan package

@harikrishna-patnala harikrishna-patnala linked an issue Aug 20, 2024 that may be closed by this pull request
@blueorangutan
Copy link

@harikrishna-patnala a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

Copy link

codecov bot commented Aug 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 15.54%. Comparing base (2ba64f2) to head (6b51570).
Report is 11 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##               main    #9550    +/-   ##
==========================================
  Coverage     15.54%   15.54%            
- Complexity    11995    11997     +2     
==========================================
  Files          5499     5499            
  Lines        481706   481706            
  Branches      58660    58852   +192     
==========================================
+ Hits          74879    74884     +5     
+ Misses       398541   398535     -6     
- Partials       8286     8287     +1     
Flag Coverage Δ
uitests 4.17% <ø> (ø)
unittests 16.32% <ø> (+<0.01%) ⬆️

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.

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 10703

Copy link
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

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

clgtm, but wonder if this covours all basis (viewers of a project that have a view only role in the project for instance)

Copy link
Contributor

@vladimirpetrov vladimirpetrov left a comment

Choose a reason for hiding this comment

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

LGTM based on manual testing using the steps provided in the PR description. Tested before and after the patch.

@DaanHoogland DaanHoogland merged commit f5c7729 into apache:main Aug 21, 2024
22 of 25 checks passed
@DaanHoogland DaanHoogland deleted the networkActionsInProject branch August 21, 2024 06:37
dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Aug 22, 2024
@DaanHoogland DaanHoogland added this to the 4.20.0.0 milestone Sep 6, 2024
rg9975 pushed a commit to rg9975/cloudstack that referenced this pull request Jan 31, 2025
dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Jun 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UI: guest network options greyed out
4 participants