django-authority


Namedjango-authority JSON
Version 0.14 PyPI version JSON
download
home_pagehttps://github.com/jazzband/django-authority/
SummaryA Django app that provides generic per-object-permissions for Django's auth app.
upload_time2020-02-07 12:49:57
maintainer
docs_urlNone
authorJannis Leidel
requires_python
licenseBSD
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            ================
django-authority
================

.. image:: https://jazzband.co/static/img/badge.svg
   :target: https://jazzband.co/
   :alt: Jazzband

.. image:: https://travis-ci.org/jazzband/django-authority.svg?branch=master
    :target: https://travis-ci.org/jazzband/django-authority

.. image:: https://codecov.io/gh/jazzband/django-authority/branch/master/graph/badge.svg
  :target: https://codecov.io/gh/jazzband/django-authority

This is a Django app for per-object-permissions that includes a bunch of
helpers to create custom permission checks.

The main website for django-authority is
`django-authority.readthedocs.org`_. You can also install the
`in-development version`_ of django-authority with
``pip install django-authority==dev`` or ``easy_install django-authority==dev``.

.. _`django-authority.readthedocs.org`: https://django-authority.readthedocs.io/
.. _in-development version: https://github.com/jazzband/django-authority/archive/master.zip#egg=django-authority-dev

Example
=======

To get the example project running do:

- Bootstrap the environment by running in a virtualenv::

    pip install Django
    pip install -e .

- Sync the database::

    python example/manage.py migrate

- Run the development server and visit the admin at http://127.0.0.1:8000/admin/::

    python example/manage.py runserver

Now create a flatage and open it to see some of the templatetags in action.
Don't hesitate to use the admin to edit the permission objects.

Please use https://github.com/jazzband/django-authority/issues/ for issues and bug reports.

Documentation
=============

The documenation is currently in development. You can create a nice looking
html version using the setup.py::

    python setup.py build_sphinx

Changelog:
==========

0.14 (2020-02-07):
------------------

* Add Django 2.2 support
* Add Python 3.7 support
* Various fixes around the test harness.
* Use Django's own method of auto-loading permissions modules.
* Fix Django admin incompatibility regarding a method removed years ago.
* Removed unused compatibility code.
* Fix BasePermission.assign for group permissions.

0.13.1 (2018-01-28):
--------------------

* Minor fixes to the documentation and versioning.

0.13 (2018-01-28):
------------------

* Added support for Django 1.11
* Drop Support for Python 3.3
* Fixed a bug with template loader

0.12 (2017-01-10):
------------------

* Added support for Django 1.10

0.11 (2016-07-17):
------------------

* Added Migration in order to support Django 1.8

* Dropped Support for Django 1.7 and lower

* Remove SQL Migration Files

* Documentation Updates

* Fix linter issues

0.10 (2015-12-14):
------------------

* Fixed a bug with BasePermissionForm and django 1.8

0.9 (2015-11-11):
-----------------

* Added support for Django 1.7 and 1.8

* Dropped support for Django 1.3

0.8 (2013-12-20):
-----------------

* Added support for Django 1.6

0.7 (2013-07-03):
-----------------

* No longer doing dependent sub-queries. It will be faster to do two small
  queries instead of one with a dependent sub-query in the general case.

0.6 (2013-06-13):
-----------------

* Added support for custom user models (Django 1.5 only).

0.5 (2013-03-18):
-----------------

* It is now possible to minimize the number of queries when using
  django-authority by caching the results of the Permission query. This can be
  done by adding ``AUTHORITY_USE_SMART_CACHE = True`` to your settings.py
* Confirmed support (via travis ci) for all combinations of Python 2.6,
  Python2.7 and Django 1.3, Django 1.4, Django 1.5. Added Python 3.3 support
  for Django 1.5


0.4 (2010-01-15):
-----------------

* Fixed an issue with the UserPermissionForm not being able to override the
  widget of the user field.

* Added ability to override form class in ``add_permission`` view.

* Added easy way to assign permissions via a permission instance, e.g.:

  .. code-block:: python

    from django.contrib.auth.models import User
    from mysite.articles.permissions import ArticlePermission

    bob = User.objects.get(username='bob')
    article_permission = ArticlePermission(bob)
    article_permission.assign(content_object=article)


0.3 (2009-07-28):
-----------------

* This version adds multiple fields to the Permission model and is
  therefore a **backwards incompatible** update.

  This was required to add a feature that allows users to request,
  withdraw, deny and approve permissions. Request and approval date
  are now saved, as well as an ``approved`` property. An admin action has
  been added for bulk approval.

  To migrate your existing data you can use the SQL files included in
  the source (`migrations/`_), currently available for MySQL, Postgres
  and SQLite.

* The templatetags have also been refactored to be easier to customize
  which required a change in the template tag signature:

  Old:

  .. code-block:: html+django

    {% permission_form flatpage %}
    {% permission_form flatpage "flatpage_permission.top_secret" %}
    {% permission_form OBJ PERMISSION_LABEL.CHECK_NAME %}

  New:

  .. code-block:: html+django

    {% permission_form for flatpage %}
    {% permission_form for flatpage using "flatpage_permission.top_secret" %}
    {% permission_form for OBJ using PERMISSION_LABEL.CHECK_NAME [with TEMPLATE] %}

  New templatetags:

  * ``permission_request_form``
  * ``get_permission_request``
  * ``get_permission_requests``
  * ``permission_request_approve_link``
  * ``permission_request_delete_link``
  * ``request_url_for_obj``

* The ``add_permission`` view is now accessible with GET requests and
  allows to request permissions, but also add them (only for users with
  the 'authority.add_permission' Django permission).

.. _`migrations/`: https://github.com/jazzbands/django-authority/tree/master/migrations



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/jazzband/django-authority/",
    "name": "django-authority",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Jannis Leidel",
    "author_email": "jannis@leidel.info",
    "download_url": "https://files.pythonhosted.org/packages/f0/21/e8d3a9cef454c7507be0a7e3aa8385ddb34c346882f19cc404abe4734194/django-authority-0.14.tar.gz",
    "platform": "",
    "description": "================\ndjango-authority\n================\n\n.. image:: https://jazzband.co/static/img/badge.svg\n   :target: https://jazzband.co/\n   :alt: Jazzband\n\n.. image:: https://travis-ci.org/jazzband/django-authority.svg?branch=master\n    :target: https://travis-ci.org/jazzband/django-authority\n\n.. image:: https://codecov.io/gh/jazzband/django-authority/branch/master/graph/badge.svg\n  :target: https://codecov.io/gh/jazzband/django-authority\n\nThis is a Django app for per-object-permissions that includes a bunch of\nhelpers to create custom permission checks.\n\nThe main website for django-authority is\n`django-authority.readthedocs.org`_. You can also install the\n`in-development version`_ of django-authority with\n``pip install django-authority==dev`` or ``easy_install django-authority==dev``.\n\n.. _`django-authority.readthedocs.org`: https://django-authority.readthedocs.io/\n.. _in-development version: https://github.com/jazzband/django-authority/archive/master.zip#egg=django-authority-dev\n\nExample\n=======\n\nTo get the example project running do:\n\n- Bootstrap the environment by running in a virtualenv::\n\n    pip install Django\n    pip install -e .\n\n- Sync the database::\n\n    python example/manage.py migrate\n\n- Run the development server and visit the admin at http://127.0.0.1:8000/admin/::\n\n    python example/manage.py runserver\n\nNow create a flatage and open it to see some of the templatetags in action.\nDon't hesitate to use the admin to edit the permission objects.\n\nPlease use https://github.com/jazzband/django-authority/issues/ for issues and bug reports.\n\nDocumentation\n=============\n\nThe documenation is currently in development. You can create a nice looking\nhtml version using the setup.py::\n\n    python setup.py build_sphinx\n\nChangelog:\n==========\n\n0.14 (2020-02-07):\n------------------\n\n* Add Django 2.2 support\n* Add Python 3.7 support\n* Various fixes around the test harness.\n* Use Django's own method of auto-loading permissions modules.\n* Fix Django admin incompatibility regarding a method removed years ago.\n* Removed unused compatibility code.\n* Fix BasePermission.assign for group permissions.\n\n0.13.1 (2018-01-28):\n--------------------\n\n* Minor fixes to the documentation and versioning.\n\n0.13 (2018-01-28):\n------------------\n\n* Added support for Django 1.11\n* Drop Support for Python 3.3\n* Fixed a bug with template loader\n\n0.12 (2017-01-10):\n------------------\n\n* Added support for Django 1.10\n\n0.11 (2016-07-17):\n------------------\n\n* Added Migration in order to support Django 1.8\n\n* Dropped Support for Django 1.7 and lower\n\n* Remove SQL Migration Files\n\n* Documentation Updates\n\n* Fix linter issues\n\n0.10 (2015-12-14):\n------------------\n\n* Fixed a bug with BasePermissionForm and django 1.8\n\n0.9 (2015-11-11):\n-----------------\n\n* Added support for Django 1.7 and 1.8\n\n* Dropped support for Django 1.3\n\n0.8 (2013-12-20):\n-----------------\n\n* Added support for Django 1.6\n\n0.7 (2013-07-03):\n-----------------\n\n* No longer doing dependent sub-queries. It will be faster to do two small\n  queries instead of one with a dependent sub-query in the general case.\n\n0.6 (2013-06-13):\n-----------------\n\n* Added support for custom user models (Django 1.5 only).\n\n0.5 (2013-03-18):\n-----------------\n\n* It is now possible to minimize the number of queries when using\n  django-authority by caching the results of the Permission query. This can be\n  done by adding ``AUTHORITY_USE_SMART_CACHE = True`` to your settings.py\n* Confirmed support (via travis ci) for all combinations of Python 2.6,\n  Python2.7 and Django 1.3, Django 1.4, Django 1.5. Added Python 3.3 support\n  for Django 1.5\n\n\n0.4 (2010-01-15):\n-----------------\n\n* Fixed an issue with the UserPermissionForm not being able to override the\n  widget of the user field.\n\n* Added ability to override form class in ``add_permission`` view.\n\n* Added easy way to assign permissions via a permission instance, e.g.:\n\n  .. code-block:: python\n\n    from django.contrib.auth.models import User\n    from mysite.articles.permissions import ArticlePermission\n\n    bob = User.objects.get(username='bob')\n    article_permission = ArticlePermission(bob)\n    article_permission.assign(content_object=article)\n\n\n0.3 (2009-07-28):\n-----------------\n\n* This version adds multiple fields to the Permission model and is\n  therefore a **backwards incompatible** update.\n\n  This was required to add a feature that allows users to request,\n  withdraw, deny and approve permissions. Request and approval date\n  are now saved, as well as an ``approved`` property. An admin action has\n  been added for bulk approval.\n\n  To migrate your existing data you can use the SQL files included in\n  the source (`migrations/`_), currently available for MySQL, Postgres\n  and SQLite.\n\n* The templatetags have also been refactored to be easier to customize\n  which required a change in the template tag signature:\n\n  Old:\n\n  .. code-block:: html+django\n\n    {% permission_form flatpage %}\n    {% permission_form flatpage \"flatpage_permission.top_secret\" %}\n    {% permission_form OBJ PERMISSION_LABEL.CHECK_NAME %}\n\n  New:\n\n  .. code-block:: html+django\n\n    {% permission_form for flatpage %}\n    {% permission_form for flatpage using \"flatpage_permission.top_secret\" %}\n    {% permission_form for OBJ using PERMISSION_LABEL.CHECK_NAME [with TEMPLATE] %}\n\n  New templatetags:\n\n  * ``permission_request_form``\n  * ``get_permission_request``\n  * ``get_permission_requests``\n  * ``permission_request_approve_link``\n  * ``permission_request_delete_link``\n  * ``request_url_for_obj``\n\n* The ``add_permission`` view is now accessible with GET requests and\n  allows to request permissions, but also add them (only for users with\n  the 'authority.add_permission' Django permission).\n\n.. _`migrations/`: https://github.com/jazzbands/django-authority/tree/master/migrations\n\n\n",
    "bugtrack_url": null,
    "license": "BSD",
    "summary": "A Django app that provides generic per-object-permissions for Django's auth app.",
    "version": "0.14",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "847e98867b1aff39067ad9f7b505ee78",
                "sha256": "20642871d146e9f989d764db28bd6ea441157ea152c817338db574632df7cd67"
            },
            "downloads": -1,
            "filename": "django_authority-0.14-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "847e98867b1aff39067ad9f7b505ee78",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 32577,
            "upload_time": "2020-02-07T12:49:46",
            "upload_time_iso_8601": "2020-02-07T12:49:46.560397Z",
            "url": "https://files.pythonhosted.org/packages/ca/a1/e22710d9d967ceee3349c92342f68787a4b8008604b1cd84a2b1e4207cfb/django_authority-0.14-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "e4748a1550eabe0dbea83a2a9d56f344",
                "sha256": "f2e0b2adfa98cc5f0b4766f35d2666c7d040452d91e93fc47401e85f85bbecbd"
            },
            "downloads": -1,
            "filename": "django-authority-0.14.tar.gz",
            "has_sig": false,
            "md5_digest": "e4748a1550eabe0dbea83a2a9d56f344",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 152795,
            "upload_time": "2020-02-07T12:49:57",
            "upload_time_iso_8601": "2020-02-07T12:49:57.474784Z",
            "url": "https://files.pythonhosted.org/packages/f0/21/e8d3a9cef454c7507be0a7e3aa8385ddb34c346882f19cc404abe4734194/django-authority-0.14.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2020-02-07 12:49:57",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "jazzband",
    "github_project": "django-authority",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "tox": true,
    "lcname": "django-authority"
}
        
Elapsed time: 0.05898s