Feature #27698

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

Added by Johannes K about 10 years ago. Updated about 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
#1

Updated by Christopher Hlubek about 10 years ago

This is due to inconsistent handling of Roles as strings or objects inside TYPO3\FLOW3\Security\Account. And the roles mapping would have to change, too.

#2

Updated by Rens Admiraal about 9 years ago

  • Assignee set to Rens Admiraal
  • Has patch set to No
#3

Updated by Karsten Dambekalns almost 9 years ago

  • Status changed from New to Under Review
  • Target version set to 2.0 beta 1
#4

Updated by Karsten Dambekalns almost 9 years ago

  • Target version changed from 2.0 beta 1 to 2.1
#5

Updated by Robert Lemke over 8 years ago

  • Target version deleted (2.1)
#6

Updated by Karsten Dambekalns about 8 years ago

  • Status changed from Under Review to Resolved
  • Target version set to 2.0
  • % Done changed from 0 to 100

Also available in: Atom PDF