Bug #49423

Role name and packageKey are not accessible

Added by Rafael Kähm about 2 years ago. Updated almost 2 years ago.

Status:New Start date:2013-06-25
Priority:Must have Due date:
Assigned To:- % Done:

0%

Category:-
Target version:-
PHP Version: Complexity:
Has patch:No Affected Flow version:Git master

Description

Properties name and packageKey for Role are not accessible, because setNameAndPackageKey() is not called.

Calling setNameAndPackageKey() in __construct() solves this.

History

#1 Updated by Alexander Berl about 2 years ago

setNameAndPackageKey() is called within initializeObject, so it should be called with __construct() automatically via the proxy class. How did you instanciate the Role object? Could this possibly be related to #47975?

#2 Updated by Rafael Kähm about 2 years ago

Alexander Berl,

yes it is but _construct() is not called by roles from repository.
_construct() is called only by "Anonymous" and "Everybody".

Q: How did you instanciate the Role object?
A: Roles are loaded from Repository over Account. ($account->getRoles())

#3 Updated by Jacob Rasmussen almost 2 years ago

I've noticed the same - and it doesn't matter if the roles are loaded directly from the repository using $repository->findAll() or as Rafael did - $account->getRoles()

Also available in: Atom PDF