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

Permission Manager issues #957

Closed
NicoleYarroch opened this issue May 10, 2018 · 2 comments
Closed

Permission Manager issues #957

NicoleYarroch opened this issue May 10, 2018 · 2 comments
Assignees
Labels
bug A defect in the library
Projects
Milestone

Comments

@NicoleYarroch
Copy link
Contributor

Bug Report

  1. The permission manager is not reset on disconnection. permissions, filters and currentHMILevel should be reset to the default values when the app disconnects from the head unit.
  2. Subscribers to permission changes will be notified unnecessarily if the new permissions for a subscribed RPC are exactly the same when an OnPermissionsChange notification is received. The sdl_filterPermissionChangesForFilters only checks for the rpcName and not the hmiPermissions and parameterPermissions.
Reproduction Steps
  1. Connect an app to SDL Core. And open the SDL app.
  2. Subscribe to GetVehicleData permissions notifications via the permissions manager.
  3. Trigger an OnPermissionsChange notification that does not include GetVehicleData.
Expected Behavior

The subscriber should not be notified.

Observed Behavior

The subscriber will be notified.

OS & Version Information
  • iOS Version: n/a
  • SDL iOS Version: 5.2
  • Testing Against: n/a
@NicoleYarroch NicoleYarroch added the bug A defect in the library label May 10, 2018
@joeljfischer joeljfischer modified the milestones: 6.1.0, 6.0.0 May 15, 2018
@joeljfischer joeljfischer added this to Bug Backlog in v6.0.0 May 15, 2018
@joeljfischer
Copy link
Contributor

For (2), this seems like a Core bug. An OnPermissionsChange should only be sent when the permission changed, not, as this report says, "if the new permissions for a subscribed RPC are exactly the same." Perhaps I'm not understanding this correctly.

@NicoleYarroch
Copy link
Contributor Author

For (2), this seems like a Core bug. An OnPermissionsChange should only be sent when the permission changed, not, as this report says, "if the new permissions for a subscribed RPC are exactly the same." Perhaps I'm not understanding this correctly.

When the OnPermissionsChange notification is sent, it includes all of the supported RPCs, not just the RPCs whose permissions changed. If the permissions for an RPC did not change, the observer will still be notified. This is because the permission manager assumes that the notification will only include the RPCs whose permissions changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A defect in the library
Projects
No open projects
v6.0.0
  
Done
Development

No branches or pull requests

2 participants