Uh oh!
There was an error while loading. Please reload this page.
Allow users to share templates with Accounts or Projects through the - #3241
Conversation
borisstoyanov
commented
Mar 28, 2019
@blueorangutan package |
blueorangutan
commented
Mar 28, 2019
@borisstoyanov a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
blueorangutan
commented
Mar 28, 2019
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-2659 |
borisstoyanov
left a comment
There was a problem hiding this comment.
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:
borisstoyanov
commented
Apr 4, 2019
@blueorangutan test |
blueorangutan
commented
Apr 4, 2019
@borisstoyanov a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
blueorangutan
commented
Apr 4, 2019
Trillian test result (tid-3471)
|
anuragaw
commented
Apr 23, 2019
@blueorangutan package |
blueorangutan
commented
Apr 23, 2019
@anuragaw a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
blueorangutan
commented
Apr 23, 2019
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-2713 |
anuragaw
commented
Apr 26, 2019
@blueorangutan test |
blueorangutan
commented
Apr 26, 2019
@anuragaw a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
blueorangutan
commented
Apr 26, 2019
Trillian test result (tid-3530)
|
shwstppr
commented
May 29, 2019
yadvr
commented
May 30, 2019
3202fec to
60ab5f8Compareanuragaw
commented
Jun 4, 2019
Fixed merge conflicts and cleaned up some code left over. @rhtyd , @shwstppr |
anuragaw
commented
Jun 4, 2019
We may have to ask @rhtyd or @PaulAngus if this is the expected behaviour or not. |
yadvr
commented
Jun 7, 2019
@anuragaw can you address this bug if you've time today? |
anuragaw
commented
Jun 7, 2019
Looking now @rhtyd |
borisstoyanov
commented
Jun 10, 2019
@blueorangutan package |
blueorangutan
commented
Jun 10, 2019
@borisstoyanov a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
blueorangutan
commented
Jun 10, 2019
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-2874 |
0ccd63d to
999eb1aCompareupdateTemplate 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
d383aa3Compareanuragaw
commented
Jul 12, 2019
@blueorangutan package |
blueorangutan
commented
Jul 12, 2019
@anuragaw a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
blueorangutan
commented
Jul 12, 2019
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-118 |
blueorangutan
commented
Jul 12, 2019
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-120 |
…em in list api calls
anuragaw
commented
Jul 17, 2019
When admins share project owned templates we will now get a distinct message. |
anuragaw
commented
Jul 17, 2019
@blueorangutan package |
blueorangutan
commented
Jul 17, 2019
@anuragaw a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
blueorangutan
commented
Jul 17, 2019
Packaging result: ✔centos6 ✖centos7 ✔debian. JID-140 |
borisstoyanov
commented
Jul 17, 2019
@blueorangutan package |
blueorangutan
commented
Jul 17, 2019
@borisstoyanov a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
blueorangutan
commented
Jul 17, 2019
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-142 |
borisstoyanov
commented
Jul 17, 2019
@blueorangutan test |
blueorangutan
commented
Jul 17, 2019
@borisstoyanov a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
borisstoyanov
commented
Jul 17, 2019
LGTM with the known issue of #3481 |
blueorangutan
commented
Jul 17, 2019
Trillian test result (tid-171)
|
PaulAngus
left a comment
There was a problem hiding this comment.
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?