Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DynamicSecurity] getGroup command returns clients without priority #2599

Closed
sszczep opened this issue Jul 23, 2022 · 3 comments
Closed

[DynamicSecurity] getGroup command returns clients without priority #2599

sszczep opened this issue Jul 23, 2022 · 3 comments

Comments

@sszczep
Copy link

sszczep commented Jul 23, 2022

Consider following message on $CONTROL MQTT topic:

{
  "commands": [
    {
      "groupname": "groupName",
      "command": "getGroup"
    }
  ]
}

The returned clients array does not include their priority like roles do.

I truly believe it is a mistake and should behave same as roles.

Using latest eclipse-mosquitto docker image running on Apple M1.

@sszczep
Copy link
Author

sszczep commented Jul 23, 2022

After further investigation, the same applies to the listGroups command.

@ralight
Copy link
Contributor

ralight commented Aug 6, 2022

I'm afraid I think you are mistaken in this case. Roles within a group have a priority for that group, to allow the roles to be ordered as desired. The clients within a group are all treated equally, there are no client priorities. In a similar way, groups in a client have priorities so that groups can be ordered as desired, but this is a client property, not a group property.

I'm going to close this because I think that should clear up things for you (and I'd like to get back on top of issues), but please do feel free to reopen this and add more information if it isn't clear.

@ralight ralight closed this as completed Aug 6, 2022
@sszczep
Copy link
Author

sszczep commented Aug 6, 2022

Sorry for reopening. Just wanted to let you know that I fully understand your point. Haven't thought of it earlier and the API seemed inconsistent at first glance. I've also noticed that the documentation is not very clear on output formats and not always specifies which properties are optional. Would you mind if I created a PR with my proposal on more clearly specified docs?

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants