gpordeus commented on PR #7974: URL: https://github.com/apache/cloudstack/pull/7974#issuecomment-1768729949
I have tested this PR by replicating the tests on my local lab. First, I tested on the current main and verified the problem was present. Then, I applied the changes and verified it had been fixed. My scenario had the same amount of domains, templates and ISOs (`ROOT` with 13 and 11 and `ROOT/test` with 4 and 2), and I used the same commands to list templates and ISOs. --- **Templates**: <details> <summary>Without the changes</summary> With `share.public.templates.with.other.domains` set to true in both domains: | Domain | Account | `count` | | ------ | ------ | ------ | | ROOT | Admin | 17 | | ROOT | User | 5 | | ROOT/test | TestAdmin | 5 | | ROOT/test | TestUser | 5 |  I marked one of the `ROOT` templates as non-public. It stopped showing in `templatefilter=featured` for all accounts: | Domain | Account | `count` | | ------ | ------ | ------ | | ROOT | Admin | 16 | | ROOT | User | 5 | | ROOT/test | TestAdmin | 5 | | ROOT/test | TestUser | 5 | With `share.public.templates.with.other.domains` set to false in both domains: | Domain | Account | `count` | | ------ | ------ | ------ | | ROOT | Admin | 17 | | ROOT | User | 5 | | ROOT/test | TestAdmin | Empty | | ROOT/test | TestUser | Empty |  </details> <details> <summary>With the changes</summary> With `share.public.templates.with.other.domains` set to true in both domains: | Domain | Account | `count` | | ------ | ------ | ------ | | ROOT | Admin | 17 | | ROOT | User | 17 | | ROOT/test | TestAdmin | 17 | | ROOT/test | TestUser | 17 |  I marked one of the templates as non-public. It stopped showing in `templatefilter=featured` for all accounts. The first column indicates the domain of the non-public template: Template Domain | Domain | Account | `count` | | ------ | ------ | ------ | ------ | | ROOT | ROOT | Admin | 16 | | ROOT | ROOT | User | 16 | | ROOT | ROOT/test | TestAdmin | 16 | | ROOT | ROOT/test | TestUser | 16 | | ROOT/test | ROOT | Admin | 16 | | ROOT/test | ROOT | User | 16 | | ROOT/test | ROOT/test | TestAdmin | 16 | | ROOT/test | ROOT/test | TestUser | 16 | With `share.public.templates.with.other.domains` set to false in both domains: | Domain | Account | `count` | | ------ | ------ | ------ | | ROOT | Admin | 17 | | ROOT | User | 13 | | ROOT/test | TestAdmin | 4 | | ROOT/test | TestUser | 4 | With `share.public.templates.with.other.domains` set to false in both domains. The first column indicates the domain of the non-public template: Template Domain | Domain | Account | `count` | | ------ | ------ | ------ | ------ | | ROOT | ROOT | Admin | 16 | | ROOT | ROOT | User | 12 | | ROOT | ROOT/test | TestAdmin | 4 | | ROOT | ROOT/test | TestUser | 4 | | ROOT/test | ROOT | Admin | 16 | | ROOT/test | ROOT | User | 13 | | ROOT/test | ROOT/test | TestAdmin | 3 | | ROOT/test | ROOT/test | TestUser | 3 | </details> --- **ISOs**: <details> <summary>Without the changes</summary> With `share.public.templates.with.other.domains` set to true in both domains: | Domain | Account | Count | | ------ | ------ | ------ | | ROOT | Admin | 13 | | ROOT | User | 5 | | ROOT/test | TestAdmin | 5 | | ROOT/test | TestUser | 5 |  I marked one of the `ROOT` ISOs as non-public. It stopped showing in `isofilter=featured` for all accounts: | Domain | Account | `count` | | ------ | ------ | ------ | | ROOT | Admin | 12 | | ROOT | User | 5 | | ROOT/test | TestAdmin | 5 | | ROOT/test | TestUser | 5 | With `share.public.templates.with.other.domains` set to false in both domains: | Domain | Account | `count` | | ------ | ------ | ------ | | ROOT | Admin | 13 | | ROOT | User | 5 | | ROOT/test | TestAdmin | Empty | | ROOT/test | TestUser | Empty |  </details> <details> <summary>With the changes</summary> With `share.public.templates.with.other.domains` set to true in both domains: | Domain | Account | `count` | | ------ | ------ | ------ | | ROOT | Admin | 13 | | ROOT | User | 13 | | ROOT/test | TestAdmin | 13 | | ROOT/test | TestUser | 13 |  I marked one of the ISOs as non-public. It stopped showing in `isofilter=featured`, for all accounts. The first column indicates the domain of the non-public ISO: ISO Domain | Domain | Account | Count | | ------ | ------ | ------ | ------ | | ROOT | ROOT | Admin | 12 | | ROOT | ROOT | User | 12 | | ROOT | ROOT/test | TestAdmin | 12 | | ROOT | ROOT/test | TestUser | 12 | | ROOT/test | ROOT | Admin | 12 | | ROOT/test | ROOT | User | 12 | | ROOT/test | ROOT/test | TestAdmin | 12 | | ROOT/test | ROOT/test | TestUser | 12 | With `share.public.templates.with.other.domains` set to false in both domains: | Domain | Account | Count | | ------ | ------ | ------ | | ROOT | Admin | 13 | | ROOT | User | 11 | | ROOT/test | TestAdmin | 2 | | ROOT/test | TestUser | 2 | I marked one of the ISOs as non-public. It stopped showing with `isofilter=featured` for all accounts. The first column indicates the domain of the non-public ISO: ISO Domain | Domain | Account | Count | | ------ | ------ | ------ | ------ | | ROOT | ROOT | Admin | 12 | | ROOT | ROOT | User | 10 | | ROOT | ROOT/test | TestAdmin | 2 | | ROOT | ROOT/test | TestUser | 2 | | ROOT/test | ROOT | Admin | 12 | | ROOT/test | ROOT | User | 11 | | ROOT/test | ROOT/test | TestAdmin | 1 | | ROOT/test | ROOT/test | TestUser | 1 | </details> --- My testing yielded the same results. The only caveat is that the featured not-public templates do not show under the featured filter to anyone. However, this situation was observed even without the patch; therefore, it is outside the scope of this PR, -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
