Skip to content
Snippets Groups Projects
Commit ce8d8501 authored by Reiter, Christoph's avatar Reiter, Christoph :snake:
Browse files

AuthorizationDataProviderInterface: make the identifier optional

This way we can return attributes even for system users, assuming they
are not tied to some user.

This is an API break, so bundles need to be updated.
parent 13eb1f36
No related branches found
No related tags found
No related merge requests found
......@@ -7,9 +7,20 @@ namespace Dbp\Relay\CoreBundle\Authorization;
interface AuthorizationDataProviderInterface
{
/**
* Returns a list of available attributes.
*
* @return string[]
*/
public function getAvailableAttributes(): array;
public function getUserAttributes(string $userIdentifier): array;
/**
* Returns an array of attribute names and values.
* In case an attribute has no value then it isn't contained.
*
* In case $userIdentifier is null then there is no active user and
* only globally available attributes shold be returned.
*
* @return array<string, mixed>
*/
public function getUserAttributes(?string $userIdentifier): array;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment