Feature #27698

Roles should use an adequate data type to get persisted as entities

Added by Johannes K about 10 years ago. Updated almost 8 years ago.

Status:
Resolved
Priority:
Should have
Assignee:
Category:
Security
Start date:
2011-06-26
Due date:
% Done:

100%

Estimated time:
PHP Version:
Has patch:
No
Complexity:

Description

At the moment the roles of an account get saved as a php-serialized array inside "flow3_security_account", e.g.:

a:2:{i:0;s:12:"Adminstrator";i:1;s:4:"User";}

This is due to (in Packages/Framework/FLOW3/Classes/Security/Policy/Role.php)

/**
 * @var array
 */
protected $roles = array();

this should be something like this (untested, just to transport the idea, I have no idea of Doctrine)

/**
 * @var \Doctrine\Common\Collections\ArrayCollection<\F3\FLOW3\Security\Policy\Role>
 * @ManyToMany
 */
protected $roles = array();

so that they will get persisted as the already prepared entities \F3\FLOW3\Security\Policy\Role.


Related issues

Related to TYPO3.Flow - Bug #28862: Inconsistent handling of roles as objects and strings in AccountResolvedRens Admiraal2011-08-09

Actions

Also available in: Atom PDF