Fixed: User not allowed to tag project created by him#3318
Fixed: User not allowed to tag project created by him#3318Spaceman1984 wants to merge 3 commits intoapache:masterfrom Spaceman1984:tagProjectBug
Conversation
|
@Spaceman1984 you have a conflict which seems very strange as the location of your change is in exactly the line that github claims it is at. Can you check what your base version was when creating the fix? |
anuragaw
left a comment
There was a problem hiding this comment.
@Spaceman1984 - you seem to have created a duplicate file TaggedResourceManagerImpl somehow. Could you remove the newly added file?
Also had couple of questions that I have left a comment inline.
| } | ||
|
|
||
| if (resourceType == ResourceObjectType.Project) { | ||
| accountId = ((ProjectVO)entity).getProjectAccountId(); |
There was a problem hiding this comment.
Couple of questions -
- Is it safe to assume the project account id will map to the user who created the project? Looks like it is set up from the passed parameter to Create Project Command.
- What happens to the projects created directly via command line. Do they work as expected? (Asking this as it is missing in the tests conducted in the PR Description.)
Also, the bug of users not being able to tag their resources extends to some other types of resources (as far as I recall in the mailing lists) but I guess we should file an open issue for others as it would be outside the scope of the current issue.
There was a problem hiding this comment.
Tested using cloudmonkey
(local) mycloudmonkey> create tags resourcetype=project resourceids=5c3eced9-1b05-494a-8f65-72565f491d27 tags[0].key="can't stop" tags[0].value="time is money"
accountid = d16af203-c08d-4157-bf5a-94be8f302390
cmd = org.apache.cloudstack.api.command.user.tag.CreateTagsCmd
created = 2019-05-09T15:30:19+0000
jobid = de83c6b2-a9e7-4b3f-b8b5-49c55cc81377
jobprocstatus = 0
jobresult:
success = True
jobresultcode = 0
jobresulttype = object
jobstatus = 1
userid = 6d1bcfeb-0640-487e-978a-f4cf348accb9
|
This branch is a bit broken, I think something went wrong when I changed from upstream to my fork. I am closing this pull request and creating a new one with the same fix. |
…ed by him #2823
Description
Fixed issue where a user cannot tag a project.
To reproduce:
in the UI:
Fixes: #2823
Types of changes
Screenshots (if appropriate):
How Has This Been Tested?
Tested from UI.
Created a new project, and tagged the project, no errors.
Tested under Ubuntu server 18.04.2 LTS using the simulator