cloudstack/engine
Daniel Carbone 000ee36224 CLOUDSTACK-9971: Bugfix/listaccounts parameter consistency (#2156)
Ran into an issue today where we passed both the "id" and "domainid" parameters into "listAccounts" and received a response despite the account id passed not belonging to the domainid passed.

Allow usage of "domainid" AND "id" in "listAccounts"
- Adding "AccountDoa::findActiveAccountById"
- Adding "AccountDaoImpl::findActiveAccountById"
- Removing seemingly pointless "listForDomain" parameter
- Updating "typeNEQ" value from "5" to "Account.ACCOUNT_TYPE_PROJECT"
  (which is "5")
- Only attempt to load domain for "path" query parameter once

"searchForAccountsInternal" input validation logic pseudo-code:
  - If "domainid" set, check immediately
  - If "id" not set:
    - and user is admin and "listall" is true
      - if "domainid" not set, use caller domain id
      - force "isrecursive" true
    - else use caller account id
  - Else if "domainid" and "name" set
    - verify existence of account and that user has access
  - Else:
    - if "domainid" not set, locate account by "id"
    - else, locate account by "id" and "domainid"
    - verify account found and caller has access rights
2018-01-03 16:59:54 +05:30
..
api CLOUDSTACK-10189: Adding nuage VSD managed network support to CloudStack (#2360) 2017-12-28 14:55:15 +05:30
components-api CLOUDSTACK-10189: Adding nuage VSD managed network support to CloudStack (#2360) 2017-12-28 14:55:15 +05:30
network Updating pom.xml version numbers for release 4.11.0.0-SNAPSHOT 2017-07-12 12:09:38 +05:30
orchestration CLOUDSTACK-10189: Adding nuage VSD managed network support to CloudStack (#2360) 2017-12-28 14:55:15 +05:30
schema CLOUDSTACK-9971: Bugfix/listaccounts parameter consistency (#2156) 2018-01-03 16:59:54 +05:30
service CLOUDSTACK-10012: Migrate to Embedded Jetty 2017-11-03 23:57:25 +05:30
storage CLOUDSTACK-9867: VM snapshot on primary storage usage metrics (#2035) 2017-12-28 14:57:10 +05:30
pom.xml Updating pom.xml version numbers for release 4.11.0.0-SNAPSHOT 2017-07-12 12:09:38 +05:30