On 20 Jan 2016, at 11:12, Andreas Jung wrote:
> we are in the situation we have existing user accounts with an
> extended set of fields per user.
>
> Is it same to extend the 'principal' schema with our set of fields
Basically yes. If you just need additional attributes, you can subclass
Principal and add
__table_args__ = {'extend_existing': True}
to your class. This adds the columns to the *same* table (principals).
If you want them in a separate table (with joined table inheritance) or
have a completely different implementation, omit extend_existing. Also
subclass Principals
(
https://github.com/Kotti/Kotti/blob/master/kotti/security.py#L443),
with a corresponding factory class attribute and set
'kotti.principals_factory' to point to your Principals implementation.
You probably also need to override some views if you want your
additional attributes to show up in registration, user management, etc.
No, this is only needed if you want completely different policies (e.g.
OAuth, ...).
HTH,
Andreas