Skip to content

Commit

Permalink
[#534] Move authorization setting to config options docs
Browse files Browse the repository at this point in the history
They are one of the most important ones and they should be found on the
conguration options docs. To avoid duplicating them the include rst
directive is used:

.. include:: /configuration.rst
   :start-after: start_config-authorization
   :end-before: end_config-authorization

This requires setting the two markers on the imported file, eg:

.. start_config-authorization

    ... stuff to include ...

.. end_config-authorization
  • Loading branch information
amercader committed Apr 26, 2013
1 parent 9c05c6f commit 01cd2de
Show file tree
Hide file tree
Showing 2 changed files with 115 additions and 27 deletions.
30 changes: 3 additions & 27 deletions doc/authorization.rst
Expand Up @@ -75,33 +75,9 @@ Configuration File Options
The following configuration file options can be used to customize CKAN's
authorization behavior:

``ckan.auth.anon_create_dataset``
Allow users to create datasets without registering and logging in,
default: false.

``ckan.auth.create_unowned_dataset``
Allow the creation of datasets not owned by any organization, default: true.

``ckan.auth.create_dataset_if_not_in_organization``
Allow users who are not members of any organization to create datasets,
default: true. ``create_unowned_dataset`` must also be true, otherwise
setting ``create_dataset_if_not_in_organization`` to true is meaningless.

``ckan.auth.user_create_groups``
Allow users to create groups, default: true.

``ckan.auth.user_create_organizations``
Allow users to create organizations, default: true.

``ckan.auth.user_delete_groups``
Allow users to delete groups, default: true.

``ckan.auth.user_delete_organizations``
Allow users to delete organizations, default: true.

``ckan.auth.create_user_via_api``
Allow new user accounts to be created via the API, default: false.

.. include:: /configuration.rst
:start-after: start_config-authorization
:end-before: end_config-authorization

Extensions
----------
Expand Down
112 changes: 112 additions & 0 deletions doc/configuration.rst
Expand Up @@ -161,6 +161,118 @@ Default value: ``False``
This controls if CKAN will track the site usage. For more info, read :ref:`tracking`.


.. _config-authorization:

Authorization Settings
----------------------

More information about how authorization works in CKAN can be found the
:doc:`authorization` section.

.. start_config-authorization
ckan.auth.anon_create_dataset
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Example::

ckan.auth.anon_create_dataset = False

Default value: ``False``

Allow users to create datasets without registering and logging in.



ckan.auth.create_unowned_dataset
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Example::

ckan.auth.create_unowned_dataset = False

Default value: ``True``


Allow the creation of datasets not owned by any organization.

ckan.auth.create_dataset_if_not_in_organization
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Example::

ckan.auth.create_dataset_if_not_in_organization = False

Default value: ``True``


Allow users who are not members of any organization to create datasets,
default: true. ``create_unowned_dataset`` must also be True, otherwise
setting ``create_dataset_if_not_in_organization`` to True is meaningless.

ckan.auth.user_create_groups
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Example::

ckan.auth.user_create_groups = False

Default value: ``True``


Allow users to create groups.

ckan.auth.user_create_organizations
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Example::

ckan.auth.user_create_organizations = False

Default value: ``True``


Allow users to create organizations.

ckan.auth.user_delete_groups
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Example::

ckan.auth.user_delete_groups = False

Default value: ``True``


Allow users to delete groups.

ckan.auth.user_delete_organizations
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Example::

ckan.auth.user_delete_organizations = False

Default value: ``True``


Allow users to delete organizations.

ckan.auth.create_user_via_api
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Example::

ckan.auth.create_user_via_api = False

Default value: ``False``


Allow new user accounts to be created via the API.

.. end_config-authorization
Search Settings
---------------

Expand Down

0 comments on commit 01cd2de

Please sign in to comment.