You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@activemq.apache.org by GitBox <gi...@apache.org> on 2022/08/05 08:40:57 UTC
[GitHub] [activemq-artemis] ehsavoie opened a new pull request, #4169: [ARTEMIS-3923]: AddressControlImpl.getRoles doesn't return all the se…
ehsavoie opened a new pull request, #4169:
URL: https://github.com/apache/activemq-artemis/pull/4169
…curity role permissions.
* Adding the missing permissions to the array.
Signed-off-by: Emmanuel Hugonnet <eh...@redhat.com>
--
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: gitbox-unsubscribe@activemq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [activemq-artemis] brusdev commented on a diff in pull request #4169: [ARTEMIS-3923]: AddressControlImpl.getRoles doesn't return all the se…
Posted by GitBox <gi...@apache.org>.
brusdev commented on code in PR #4169:
URL: https://github.com/apache/activemq-artemis/pull/4169#discussion_r939492122
##########
tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/AddressControlTest.java:
##########
@@ -240,13 +240,11 @@ public void testGetRoles() throws Exception {
Assert.assertEquals(1, roles.length);
Object[] r = (Object[]) roles[0];
Assert.assertEquals(role.getName(), r[0]);
- Assert.assertEquals(CheckType.SEND.hasRole(role), r[1]);
- Assert.assertEquals(CheckType.CONSUME.hasRole(role), r[2]);
- Assert.assertEquals(CheckType.CREATE_DURABLE_QUEUE.hasRole(role), r[3]);
- Assert.assertEquals(CheckType.DELETE_DURABLE_QUEUE.hasRole(role), r[4]);
- Assert.assertEquals(CheckType.CREATE_NON_DURABLE_QUEUE.hasRole(role), r[5]);
- Assert.assertEquals(CheckType.DELETE_NON_DURABLE_QUEUE.hasRole(role), r[6]);
- Assert.assertEquals(CheckType.MANAGE.hasRole(role), r[7]);
+ int i = 1;
+ for (CheckType type: CheckType.values()) {
Review Comment:
This loop scans the CheckType values in the definition order: SEND, CONSUME, CREATE_ADDRESS, DELETE_ADDRESS, ... .While the `getRoles` method returns roles in the following order: SEND, CONSUME, CREATE_DURABLE_QUEUE, DELETE_DURABLE_QUEUE, ...
--
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: gitbox-unsubscribe@activemq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [activemq-artemis] brusdev merged pull request #4169: [ARTEMIS-3923]: AddressControlImpl.getRoles doesn't return all the se…
Posted by GitBox <gi...@apache.org>.
brusdev merged PR #4169:
URL: https://github.com/apache/activemq-artemis/pull/4169
--
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: gitbox-unsubscribe@activemq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [activemq-artemis] brusdev commented on pull request #4169: [ARTEMIS-3923]: AddressControlImpl.getRoles doesn't return all the se…
Posted by GitBox <gi...@apache.org>.
brusdev commented on PR #4169:
URL: https://github.com/apache/activemq-artemis/pull/4169#issuecomment-1206307579
@ehsavoie could you remove '[]:' from your commit message, i.e. `ARTEMIS-3923 AddressControlImpl.getRoles doesn't return all the security role permissions.`
--
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: gitbox-unsubscribe@activemq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org