User permissions to frontend-edit static placeholders

45 views
Skip to first unread message

Sebastian Braun

unread,
Jun 11, 2014, 11:33:41 AM6/11/14
to django-cms...@googlegroups.com
Hi,

I'd like to implement a permission system to the static placeholder, which (dis)allows certain users to edit the content of static placeholders. If the user has no permission to edit static placeholders, the public (and cached) content should be shown.

The implementation of this would be quite simple:

1) Check the permission in static_placeholder (cms/templatetags/cms_tags.py) and set 

placeholder = static_placeholder.public
placeholder.is_flat = True

if the user lacks the permission.

2) Set

edit = False 
processors = None

in render_placeholder (cms/plugin_rendering,py) if any placeholder has the attribute is_flat = True

Sebastian

Patrick Lauber

unread,
Jun 11, 2014, 11:46:30 AM6/11/14
to django-cms...@googlegroups.com
Sounds good…. looking forward to a pull request :)
> --
> You received this message because you are subscribed to the Google Groups "django-cms-developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to django-cms-devel...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages