-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Allow users to share templates with Accounts or Projects through the #3241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@blueorangutan package |
|
@borisstoyanov a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-2659 |
borisstoyanov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this neat feature @rhtyd, I just have one issue with it
When adding a project I get an error saying 'an account or projectid needs to be passed', I suppose there's something wrong with the passing of the projectId
Here's the steps:
|
@blueorangutan test |
|
@borisstoyanov a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-3471)
|
|
@blueorangutan package |
|
@anuragaw a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-2713 |
|
@blueorangutan test |
|
@anuragaw a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-3530)
|
3202fec to
60ab5f8
Compare
|
Fixed merge conflicts and cleaned up some code left over. @rhtyd , @shwstppr |
We may have to ask @rhtyd or @PaulAngus if this is the expected behaviour or not. |
|
@anuragaw can you address this bug if you've time today? |
|
Looking now @rhtyd |
|
@blueorangutan package |
|
@borisstoyanov a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-2874 |
0ccd63d to
999eb1a
Compare
updateTemplate permissions API
The older UI was confusing as it showed both project and accounts. The list of accounts and projects with add/remove wasn't consistent and instead showed everything. This patch updates the dialogue layout logic to only allow users to select accounts or project one at a time. The lists are also populated such that users see accounts/projects which don't have permissions to add and accounts/projects that have permissions to remove.
…date template permissions
bcefd68 to
d383aa3
Compare
|
@blueorangutan package |
|
@anuragaw a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-118 |
|
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-120 |
…em in list api calls
|
When admins share project owned templates we will now get a distinct message. |
|
@blueorangutan package |
|
@anuragaw a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos6 ✖centos7 ✔debian. JID-140 |
|
@blueorangutan package |
|
@borisstoyanov a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-142 |
|
@blueorangutan test |
|
@borisstoyanov a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
LGTM with the known issue of #3481 |
|
Trillian test result (tid-171)
|
PaulAngus
left a comment
There was a problem hiding this 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 for positive and negative results





Problem: CloudStack users want the ability to share templates with other accounts or projects through the UI.
Root Cause: The ‘updateTemplatePermissions’ is only available via API and needs to be integrated with the UI in order to allow users to share templates with other accounts within the same domain, and also with projects that the sharing account has access to.
Solution: The CloudStack UI template view has been extended to include a button that allows users to update template permissions through the ‘updateTemplatePermissions’ API. This API supports 3 operations i.e. add, remove or reset. The reset operation does not require any parameters and it simply removes all permissions for a template. The add and remove parameters require either accounts or projects to be specified for sharing or stop sharing templates. The ‘listAccounts’ API has been extended to allow users to see all the accounts within the same domain if the global setting ‘allow.view.all.domain.accounts’ is set to true. This allows the accounts selection to be a multi-selection.
Types of changes
Screenshots (if appropriate):
Reset Operation hides the Accounts and Project ID fields as this operation does not require any additional parameters to be set.
Operation = Reset; Account and Project fields not displayed

Operation = Add/Remove , global setting: 'allow.user.view.all.domain.accounts' = false;

Operation = Add , global setting: 'allow.user.view.all.domain.accounts' = true; Domain has 3 accounts in total (bt1, bt2 and bt3). Logged in user is bt1 and so it is not shown on the dropdown list.

Operation = Remove , global setting: 'allow.user.view.all.domain.accounts' = true; Domain has 3 accounts in total (bt1, bt2 and bt3). The current template was only shared with bt2 by bt1 so dropdown menu only shows accounts that the current template has been shared with.

How Has This Been Tested?