This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

A simple FeinCMS extension that adds permission-checking to a model. The model is assumed to be a Page, but it could be any FeinCMS model.

Usage

Install using pip:

pip install feincms-pagepermissions

Change your Django settings to include pagepermissions:

INSTALLED_APPS += (
    'pagepermissions',
)

Then add the extension to your content type:

Page.register_extensions(
    ...
    'pagepermissions.extension',
)

This will add a permissions field to your content type that you will have to add yourself through syncdb or South or otherwise.

When you edit or add a page you will have the option of setting the permissions required for a user to view that page. You can select multiple permissions, and if the user has any of those they will be able to view the page. Otherwise they will receive a 403.

Finally, you may also want to keep a page out of the navigation if the user has no permission to view it. For this, there is a template filter called check_page_permission. Use it as follows in your template:

{% load feincms_page_tags feincms_pagepermissions_tags %}

{% feincms_nav feincms_page level=1 depth=1 as level1 %}
{% for page in level1 %}
    {% if page|check_page_permission:user %}
       ...display page navigation...
    {% endif %}
{% endfor %}

Contributing

Your pull requests are very welcome! Please follow the established code style.

License

feincms-pagepermissions is released under the BSD license.

Release History

Release History

0.3.1

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.3.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
feincms-pagepermissions-0.3.1.tar.gz (3.9 kB) Copy SHA256 Checksum SHA256 Source Jan 21, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting