{ "info": { "author": "Lucia Espona Pernas", "author_email": "lucia.espona@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7" ], "description": ".. You should enable this project on travis-ci.org and coveralls.io to make\n these badges work. The necessary Travis and Coverage config files have been\n generated for you.\n\n.. image:: https://travis-ci.org/espona/ckanext-restricted.svg?branch=master\n :target: https://travis-ci.org/espona/ckanext-restricted\n\n.. image:: https://coveralls.io/repos/espona/ckanext-restricted/badge.svg\n :target: https://coveralls.io/r/espona/ckanext-restricted\n\n.. image:: https://pypip.in/download/ckanext-restricted/badge.svg\n :target: https://pypi.python.org/pypi//ckanext-restricted/\n :alt: Downloads\n\n.. image:: https://pypip.in/version/ckanext-restricted/badge.svg\n :target: https://pypi.python.org/pypi/ckanext-restricted/\n :alt: Latest Version\n\n.. image:: https://pypip.in/py_versions/ckanext-restricted/badge.svg\n :target: https://pypi.python.org/pypi/ckanext-restricted/\n :alt: Supported Python versions\n\n.. image:: https://pypip.in/status/ckanext-restricted/badge.svg\n :target: https://pypi.python.org/pypi/ckanext-restricted/\n :alt: Development Status\n\n.. image:: https://pypip.in/license/ckanext-restricted/badge.svg\n :target: https://pypi.python.org/pypi/ckanext-restricted/\n :alt: License\n\n=============\nckanext-restricted\n=============\n\n.. Put a description of your extension here:\n What does it do? What features does it have?\n Consider including some screenshots or embedding a video!\n\nCKAN extension to restrict the accessibility to the resources of a dataset.\nThis way the package metadata is accesible but not the data itself (resource). \nThe resource access restriction level can be individualy defined for every package.\nUsers can request access to a dataset by pressing a button. The package owner can\nallow individual users to access the resource.\nIt also includes notifying by mail on every new user registration.\n\nrestricted_resources_metadata.PNG\nrestricted_resources_preview.PNG\n\n.. figure:: restricted_resources_preview.PNG\n :align: center\n :alt: Package view with restricted resources\n :figclass: align-center\n\n Package view with restricted resources\n\n.. figure:: restricted_resources_metadata.PNG\n :align: center\n :alt: Resource metadata including restriction configuration\n :figclass: align-center\n\n Resource metadata including restriction configuration\n \n.. figure:: restricted_resources_request_form.PNG\n :align: center\n :alt: Request form for restricted resources\n :figclass: align-center\n\n Request form for restricted resources\n\n------------\nRequirements\n------------\n\nThis extension has been developed for CKAN version 2.5.2.\n\nThe resource access restriction level can be individualy defined for every package. This requires adding an extra field to package metadata with (some of) the possible values: \"public\", \"registered\", \"any_organization\", \"same_organization\" (as the package).\n\nThe allowed user list is also defined in an additional field that includes autocomplete.\n\nIf you use ckanext-scheming and ckanext-composite, this is the field definition in JSON:\n::\n {\n \"scheming_version\": 1,\n \"dataset_type\": \"dataset\",\n \"about\": \"\",\n \"about_url\": \"http://github.com/ckan/ckanext-scheming\",\n \"dataset_fields\": [...],\n \"resource_fields\": [\n [...]\n {\n \"field_name\": \"restricted\",\n \"label\": \"Access Restriction\",\n \"preset\": \"composite\",\n \"subfields\":\n [\n {\n \"field_name\": \"level\",\n \"label\": \"Level\",\n \"preset\": \"select\",\n \"form_include_blank_choice\": false,\n \"required\": true,\n \"choices\": [\n {\n \"value\": \"public\",\n \"label\": \"Public\"\n },\n {\n \"value\": \"registered\",\n \"label\": \"Registered Users\"\n },\n {\n \"value\": \"any_organization\",\n \"label\": \"Any Organization Members (Trusted Users)\"\n },\n {\n \"value\": \"same_organization\",\n \"label\": \"Same Organization Members\"\n }\n ]\n },\n {\n \"field_name\": \"allowed_users\",\n \"label\": \"Allowed Users\",\n \"preset\": \"tag_string_autocomplete\",\n \"data-module-source\":\"/api/2/util/user/autocomplete?q=?\"\n }\n ]\n }\n ]\n }\n\nThe usage of this extension, regarding the level \"any_organization\", makes more sense if the CKAN administrator sets some users as members of an organization. In our case we created an organization called \"trusted_users\" where the mail accounts have been double checked. Therefore this extension sends a mail to the defined 'mail_to' in the CKAN config file at every new user registration. To swithch off this functionality, just comment out the code at: \nhttps://github.com/espona/ckanext-restricted/blob/master/ckanext/restricted/plugin.py#L14\n\n\n\n------------\nInstallation\n------------\n\n.. Add any additional install steps to the list below.\n For example installing any non-Python dependencies or adding any required\n config settings.\n\nTo install ckanext-restricted:\n\n1. Activate your CKAN virtual environment, for example::\n\n . /usr/lib/ckan/default/bin/activate\n\n2. Install the ckanext-restricted Python package into your virtual environment::\n\n pip install ckanext-restricted\n\n3. Add ``restricted`` to the ``ckan.plugins`` setting in your CKAN\n config file (by default the config file is located at\n ``/etc/ckan/default/production.ini``).\n\n4. Restart CKAN. For example if you've deployed CKAN with Apache on Ubuntu::\n\n sudo service apache2 reload\n\n\n---------------\nConfig Settings\n---------------\n\nDocument any optional config settings here. For example::\n\n # The minimum number of hours to wait before re-checking a resource\n # (optional, default: 24).\n ckanext.restricted.some_setting = some_default_value\n\n\n------------------------\nDevelopment Installation\n------------------------\n\nTo install ckanext-restricted for development, activate your CKAN virtualenv and\ndo::\n\n git clone https://github.com/espona/ckanext-restricted.git\n cd ckanext-restricted\n python setup.py develop\n pip install -r dev-requirements.txt\n\n\n-----------------\nRunning the Tests\n-----------------\n\nTo run the tests, do::\n\n nosetests --nologcapture --with-pylons=test.ini\n\nTo run the tests and produce a coverage report, first make sure you have\ncoverage installed in your virtualenv (``pip install coverage``) then run::\n\n nosetests --nologcapture --with-pylons=test.ini --with-coverage --cover-package=ckanext.restricted --cover-inclusive --cover-erase --cover-tests\n\n\n---------------------------------\nRegistering ckanext-restricted on PyPI\n---------------------------------\n\nckanext-restricted should be availabe on PyPI as\nhttps://pypi.python.org/pypi/ckanext-restricted. If that link doesn't work, then\nyou can register the project on PyPI for the first time by following these\nsteps:\n\n1. Create a source distribution of the project::\n\n python setup.py sdist\n\n2. Register the project::\n\n python setup.py register\n\n3. Upload the source distribution to PyPI::\n\n python setup.py sdist upload\n\n4. Tag the first release of the project on GitHub with the version number from\n the ``setup.py`` file. For example if the version number in ``setup.py`` is\n 0.0.1 then do::\n\n git tag 0.0.1\n git push --tags\n\n\n----------------------------------------\nReleasing a New Version of ckanext-restricted\n----------------------------------------\n\nckanext-restricted is availabe on PyPI as https://pypi.python.org/pypi/ckanext-restricted.\nTo publish a new version to PyPI follow these steps:\n\n1. Update the version number in the ``setup.py`` file.\n See `PEP 440 `_\n for how to choose version numbers.\n\n2. Create a source distribution of the new version::\n\n python setup.py sdist\n\n3. Upload the source distribution to PyPI::\n\n python setup.py sdist upload\n\n4. Tag the new release of the project on GitHub with the version number from\n the ``setup.py`` file. For example if the version number in ``setup.py`` is\n 0.0.2 then do::\n\n git tag 0.0.2\n git push --tags", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/espona/ckanext-restricted", "keywords": "CKAN restrict access resource", "license": "AGPL", "maintainer": null, "maintainer_email": null, "name": "ckanext-restricted", "package_url": "https://pypi.org/project/ckanext-restricted/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/ckanext-restricted/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/espona/ckanext-restricted" }, "release_url": "https://pypi.org/project/ckanext-restricted/0.0.2/", "requires_dist": null, "requires_python": null, "summary": "Data restricting access extension for CKAN", "version": "0.0.2" }, "last_serial": 2767335, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "9f6cce3e3ac99e6eb16db39ea962c60a", "sha256": "eb19650442fe6efef263dc79e33b6d1a4f983112a4ec14100ec234ce2a730cea" }, "downloads": -1, "filename": "ckanext-restricted-0.0.1.tar.gz", "has_sig": false, "md5_digest": "9f6cce3e3ac99e6eb16db39ea962c60a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13607, "upload_time": "2017-04-07T12:01:09", "url": "https://files.pythonhosted.org/packages/7e/65/c28753a3dad35f63d2be2deacccb5a8684c28cba960dc1488818babbdd75/ckanext-restricted-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "bccb90dc9a9cacea2272b9414dd22edf", "sha256": "90a65f12b77d704ce8fcc4478df4698a28447f97112b62d57285d1a6604e677b" }, "downloads": -1, "filename": "ckanext-restricted-0.0.2.tar.gz", "has_sig": false, "md5_digest": "bccb90dc9a9cacea2272b9414dd22edf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13622, "upload_time": "2017-04-10T19:05:48", "url": "https://files.pythonhosted.org/packages/81/9a/7cf5985dc78d440dcccff25ac4c7f9d09639e566d16fc44669dffeee8202/ckanext-restricted-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "bccb90dc9a9cacea2272b9414dd22edf", "sha256": "90a65f12b77d704ce8fcc4478df4698a28447f97112b62d57285d1a6604e677b" }, "downloads": -1, "filename": "ckanext-restricted-0.0.2.tar.gz", "has_sig": false, "md5_digest": "bccb90dc9a9cacea2272b9414dd22edf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13622, "upload_time": "2017-04-10T19:05:48", "url": "https://files.pythonhosted.org/packages/81/9a/7cf5985dc78d440dcccff25ac4c7f9d09639e566d16fc44669dffeee8202/ckanext-restricted-0.0.2.tar.gz" } ] }