Skip to content

remove Project Template Permissions inhibition#9196

Merged
vishesh92 merged 5 commits intoapache:4.19from
shapeblue:ghi7350-removeProjectTemplatePermissionsInhibition
Jun 21, 2024
Merged

remove Project Template Permissions inhibition#9196
vishesh92 merged 5 commits intoapache:4.19from
shapeblue:ghi7350-removeProjectTemplatePermissionsInhibition

Conversation

@DaanHoogland
Copy link
Copy Markdown
Contributor

Description

This PR removes the inhibition for projects to update template permissions.

Fixes: #7350

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

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

@codecov
Copy link
Copy Markdown

codecov bot commented Jun 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 4.28%. Comparing base (7dce3d8) to head (aa4b0fd).
Report is 1 commits behind head on 4.19.

Additional details and impacted files
@@             Coverage Diff              @@
##               4.19   #9196       +/-   ##
============================================
- Coverage     14.95%   4.28%   -10.68%     
============================================
  Files          5382     363     -5019     
  Lines        470092   29395   -440697     
  Branches      57685    5139    -52546     
============================================
- Hits          70311    1260    -69051     
+ Misses       391993   27992   -364001     
+ Partials       7788     143     -7645     
Flag Coverage Δ
uitests 4.28% <ø> (-0.01%) ⬇️
unittests ?

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.

Copy link
Copy Markdown
Member

@yadvr yadvr left a comment

Choose a reason for hiding this comment

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

LGTM - but worth testing, if templates owned by projects shared with accounts and other projects, can actually be listed by non-project accounts and other projects? May be also worth adding a Marvin test.

@DaanHoogland
Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@DaanHoogland 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.

@blueorangutan
Copy link
Copy Markdown

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

@yadvr yadvr requested review from shwstppr and sureshanaparti June 18, 2024 07:35
Copy link
Copy Markdown
Member

@vishesh92 vishesh92 left a comment

Choose a reason for hiding this comment

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

clgtm

@vishesh92
Copy link
Copy Markdown
Member

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@vishesh92 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.

@vishesh92
Copy link
Copy Markdown
Member

@DaanHoogland I tested the below scenario in an env with a Simulator zone:

  1. Create a normal user
  2. Create a project
  3. Create a template with admin account in a project
  4. Share the template with the normal user

Now the normal user doesn't have access to the project.
image

Toggling the Projects button, I can see the template.
image

I couldn't deploy a VM via UI because I couldn't see the template while launching the VM.
image

I am not sure if this is intended or if this is another bug or an enhancement?

@blueorangutan
Copy link
Copy Markdown

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

@DaanHoogland
Copy link
Copy Markdown
Contributor Author

@DaanHoogland I tested the below scenario in an env with a Simulator zone:

1. Create a normal user

2. Create a project

3. Create a template with admin account in a project

4. Share the template with the normal user

...

I am not sure if this is intended or if this is another bug or an enhancement?

as discussed I think the deplpoy wizard can not handle the truth. I'll have a look. thanks @vishesh92

@DaanHoogland DaanHoogland force-pushed the ghi7350-removeProjectTemplatePermissionsInhibition branch from 4f6da0c to aa4b0fd Compare June 20, 2024 12:23
@DaanHoogland
Copy link
Copy Markdown
Contributor Author

@vishesh92 , seemed trivial. I have now added the projectid=-1 parameter to the api call in the deploy wizard. Can you re-test/-check/-view?

@DaanHoogland
Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@DaanHoogland 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.

@blueorangutan
Copy link
Copy Markdown

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

Copy link
Copy Markdown
Contributor

@sureshanaparti sureshanaparti left a comment

Choose a reason for hiding this comment

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

clgtm

@vishesh92
Copy link
Copy Markdown
Member

vishesh92 commented Jun 21, 2024

@DaanHoogland Tested now. Able to launch a VM using the shared template using UI.

@vishesh92 vishesh92 merged commit 60f234c into apache:4.19 Jun 21, 2024
@vishesh92 vishesh92 deleted the ghi7350-removeProjectTemplatePermissionsInhibition branch June 21, 2024 09:50
@slavkap
Copy link
Copy Markdown
Contributor

slavkap commented Jun 24, 2024

Hi all, on my dev. environments I don't work with projects (and I'm not very familiar with this option). I don't see any available templates when using the deploy VM wizard because of the projectid=-1 in the API call. Should this be handled in the backend?

@DaanHoogland
Copy link
Copy Markdown
Contributor Author

Hi all, on my dev. environments I don't work with projects (and I'm not very familiar with this option). I don't see any available templates when using the deploy VM wizard because of the projectid=-1 in the API call. Should this be handled in the backend?

No @slavkap I think another parameter needs to be set as well, or the the parameter needs to be optional (as in list templates)

@vishesh92
Copy link
Copy Markdown
Member

vishesh92 commented Jun 25, 2024

@slavkap @DaanHoogland I have created a PR to fix this issue here: #9300

dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

Templates owned by Project Account not allowed to share templates

6 participants