Skip to content

Add ability to override default excluded permissions with an empty array in GraphMinimalPermissionsGuidancePlugin #1342

@bartizan

Description

@bartizan

In the GraphMinimalPermissionsGuidancePlugin config, the permissionsToExclude property currently defaults to ["profile", "openid", "offline_access", "email"]. This default applies when the property is undefined, null, or an empty array ([]).

We need to add the ability to override this default list with an empty list of permissions (meaning none will be excluded).

The suggested behavior is that if the permissionsToExclude property is explicitly defined in the configuration, it will completely replace the default permissions.

Here's a breakdown of the expected behavior for the permissionsToExclude property:

permissionsToExclude property Value Result
undefined absent Default list
defined null [ ]
defined [ ] [ ]
defined a non-empty, e.g., ["ids.user.read"] ["ids.user.read"]

Theoretically, a null value for the property could be interpreted as the default permissions, but I'd prefer not to implement that.

How should we proceed with that?

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions