Skip to content

BUG-ID: CLOUDSTACK-8483 - Private template not visible in project - #334

Closed
sudhansu7 wants to merge 2 commits into
apache:4.5from
sudhansu7:CLOUDSTACK-8483
Closed

sudhansu7 wants to merge 2 commits into
apache:4.5from
sudhansu7:CLOUDSTACK-8483

Conversation

@sudhansu7

Copy link
Copy Markdown

added new 'projectId' parameter in createTemplate command and based current user, account and projectid decide the owner of the template.

Problem: Template created using createTemplte API within project context is not visible in project view.
Root Cause: CeateTemplate API does not have projectId parameter and hence it creates the template against the caller's account id.
Solution: A new parameter 'projectId' has been added to createTemplate command and the ownership is decided based on current user account and projectid.

added new 'projectId' parameter in createTemplate command and based current user, account and projectid decide the owner of the template.
@asfbot

asfbot commented May 30, 2015

Copy link
Copy Markdown

cloudstack-pull-requests #277 SUCCESS
This pull request looks good

@karuturi

karuturi commented Jun 4, 2015

Copy link
Copy Markdown
Member

Do we really need projectId here? The api doc says "A template created from this command is automatically designated as a private template visible to the account that created it."

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

accountId is unused. Can we initialize it with CallContext.current().getCallingAccount() and use it (which saves some function calls)?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I will make this change

@sebgoa

sebgoa commented Jul 2, 2015

Copy link
Copy Markdown
Member

@sudhansu7 can you reply to @karuturi ? thanks. Otherwise this will stay stuck waiting for your answer.

@sudhansu7

Copy link
Copy Markdown
Author

@karuturi
When a user switches to project view the ownership changes to project account. So any resource created inside project view should be mapped to project account.

added new 'projectId' parameter in createTemplate command and based
current user, account and projectid decide the owner of the template.
@kishankavala

Copy link
Copy Markdown
Contributor

There is an API change. Should this go into master only?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ping. Since, this is an append only API change. IMO we can merge on 4.5 as well.
Updates, is this good to go?

@DaanHoogland

Copy link
Copy Markdown
Contributor

@karuturi @kishankavala can you answer @bhaisaab or add your LGTM?

@karuturi

Copy link
Copy Markdown
Member

with the new changes, looks good to me 👍

@karuturi

Copy link
Copy Markdown
Member

@sudhansu7 can you please rebase the changes for master?

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.

7 participants