Refactor page and group user handling

67 views
Skip to first unread message

czpython

unread,
Jun 13, 2016, 2:11:06 PM6/13/16
to django CMS developers
Hello,

Currently there's three tickets related to issues with the current implementation of our user and groups models.


Basically we're relying on the current thread to store the request user and use that in a couple of places.
I've done an initial analysis and concluded that we can safely remove the dependency on the thread user for all places

I'm proposing for us to refactor the user and group models on the CMS to no longer be subclasses of Django's User model.
Instead, they should be proxy models that add some functionality (not fields) specific to our use case.
This would avoid sync issues like the one mentioned in https://github.com/divio/django-cms/issues/5328.

To do this I would like revisit the use cases for having the created_by field on both user and group models.

If we're unable replace the created_by field then I suggest having a separate model to make this relationship more explicit,
something like Manager where users can be assigned as managers of other users or groups.

Let me know what you guys think.

Martin Koistinen

unread,
Jun 15, 2016, 12:26:03 AM6/15/16
to django CMS developers
Generally OK from my side, though, I'm not crazy about changing the way that the User model stuff is architected... again. Which release would you like to target with something like this?

czpython

unread,
Jun 15, 2016, 8:19:40 AM6/15/16
to django CMS developers
My goal is to land this in 3.5


On Monday, June 13, 2016 at 2:11:06 PM UTC-4, czpython wrote:
Reply all
Reply to author
Forward
0 new messages