[
https://issues.apache.org/jira/browse/ARTEMIS-3923?focusedWorklogId=798598&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-798598
]
ASF GitHub Bot logged work on ARTEMIS-3923:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 06/Aug/22 06:37
Start Date: 06/Aug/22 06:37
Worklog Time Spent: 10m
Work Description: 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, ...
Issue Time Tracking
-------------------
Worklog Id: (was: 798598)
Time Spent: 0.5h (was: 20m)
> AddressControlImpl.getRoles doesn't return all the security role permissions
> ----------------------------------------------------------------------------
>
> Key: ARTEMIS-3923
> URL: https://issues.apache.org/jira/browse/ARTEMIS-3923
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Reporter: Emmanuel Hugonnet
> Priority: Minor
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> The permissions BROWSE, CREATE_ADDRESS and DELETE_ADDRESS aren't provided in
> the returned array.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)