Coder Social home page Coder Social logo

ckanext-restricted's People

Contributors

espona avatar luketully avatar manoj-nathwani avatar movermeyer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ckanext-restricted's Issues

Exception retrieving dataset for the form

Hello,

This extension is great and does exactly what I needed. It seems to work perfectly except for the Request Access form. When I log in as a user that doesn't have access to the resource and click de "Request Access" button I get the following:

404 Not Found
The resource could not be found.

Exception retrieving dataset for the form

Am I missing something?

Thank you.

Speeding up package search requests

Hi there,

We're using a fork of ckanext-restricted, thanks for the good work in preparing the repo.

I'm puzzled by the following line:

authorized = auth.restricted_resource_show(

Can you give some further info on it's purpose? The output of the line appears to be ignored by the code. Removing the line doesn't break any tests, and at the moment I haven't been able to see that it has any impact on the UI or api requests.

Is it's job to raise some exceptions? I can see that during execution of this line check_access is called for the "package_show" action on the resource's parent pacakge, however, any exceptions raised by this are not caught which seems slightly odd to me - I wouldn't want someone to be unauthorised to view all their search results just because they don't have access to view one of their search results.

...maybe I'm missing something obvious!

We're having problems with ckanext-requests slowing down package_search requests. By my reckoning this line is slowing down package_search requests by a factor >4x what it is without the line, so I want to be clear on why it is there.

Jonathan Berry
fjelltopp.org

There were problems sending your request, please contact the administrator providing the information (email_to_undefined)

Good day!, I fund this extension and it was Good. After I clicked button send request, it will redirect with this information below:
test6

However request access has been sent. I've checked my email and received this email below:
test 5
testtest

CKAN support email and in CC have email_to_undefined. But I've alreadyy checked my ini file and the credentials is correct.

last123
Any Help, suggestion , advice is so much appreciated !! TIA

Installing the extension

Hi,
I'm trying to install your interesting plugin into my CKAN 2.6a installation, and all I get is :
(default)debian@ckan:/usr/lib/ckan/default/src$ pip install ckanext-restricted Downloading/unpacking ckanext-restricted Could not find any downloads that satisfy the requirement ckanext-restricted Cleaning up... No distributions at all found for ckanext-restricted Storing debug log for failure in /home/debian/.pip/pip.log

After setting up this extension, we have no access to all the datasets because of Internal server error

The extension is very useful to me.
I intend to divide the user into two parts.
One is who login the CKAN, and the other one is who don't login
The former have the download access, and the latter just have only preview access.

So I did as the readme. There are some errors when I run the CKAN:

Traceback (most recent call last):
  File "c:\users\administrator\envs\ckan\lib\site-packages\flask\app.py", line 1612, in full_dispatch_request
    rv = self.dispatch_request()
  File "c:\users\administrator\envs\ckan\lib\site-packages\flask\app.py", line 1598, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "D:\CodeApp\workspace\ckan\ckan\views\dataset.py", line 478, in read
    u'is_activity_archive': bool(activity_id),
  File "D:\CodeApp\workspace\ckan\ckan\lib\base.py", line 148, in render
    return flask_render_template(template_name, **extra_vars)
  File "c:\users\administrator\envs\ckan\lib\site-packages\flask\templating.py", line 134, in render_template
    context, ctx.app)
  File "c:\users\administrator\envs\ckan\lib\site-packages\flask\templating.py", line 116, in _render
    rv = template.render(context)
  File "c:\users\administrator\envs\ckan\lib\site-packages\jinja2\environment.py", line 1008, in render
    return self.environment.handle_exception(exc_info, True)
  File "c:\users\administrator\envs\ckan\lib\site-packages\jinja2\environment.py", line 780, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "D:\CodeApp\workspace\ckan\ckan\templates\package\read.html", line 1, in top-level template code
    {% extends "package/read_base.html" %}
  File "D:\CodeApp\workspace\ckan\ckan\templates\package\read_base.html", line 1, in top-level template code
    {% extends "package/base.html" %}
  File "D:\CodeApp\workspace\ckan\ckan\templates\package\base.html", line 3, in top-level template code
    {% set pkg = pkg_dict %}
  File "D:\CodeApp\workspace\ckan\ckan\templates\page.html", line 1, in top-level template code
    {% extends "base.html" %}
  File "c:\users\administrator\envs\ckan\lib\site-packages\ckanext\restricted\templates\base.html", line 1, in top-level template code
    {% ckan_extends %}
  File "D:\CodeApp\workspace\ckan\ckan\templates\base.html", line 106, in top-level template code
    {%- block page %}{% endblock -%}
  File "D:\CodeApp\workspace\ckan\ckan\templates\page.html", line 19, in block "page"
    {%- block content %}
  File "D:\CodeApp\workspace\ckan\ckan\templates\page.html", line 22, in block "content"
    {% block main_content %}
  File "D:\CodeApp\workspace\ckan\ckan\templates\page.html", line 74, in block "main_content"
    {% block primary %}
  File "D:\CodeApp\workspace\ckan\ckan\templates\page.html", line 87, in block "primary"
    {% block primary_content %}
  File "D:\CodeApp\workspace\ckan\ckan\templates\page.html", line 107, in block "primary_content"
    {% block primary_content_inner %}
  File "D:\CodeApp\workspace\ckan\ckan\templates\package\read.html", line 44, in block "primary_content_inner"
    {% block package_resources %}
  File "D:\CodeApp\workspace\ckan\ckan\templates\package\read.html", line 45, in block "package_resources"
    {% snippet "package/snippets/resources_list.html", pkg=pkg, resources=pkg.resources, is_activity_archive=is_activity_archive %}
  File "D:\CodeApp\workspace\ckan\ckan\lib\jinja_extensions.py", line 269, in _call
    return base.render_snippet(*args, **kwargs)
  File "D:\CodeApp\workspace\ckan\ckan\lib\base.py", line 107, in render_snippet
    raise exc
TemplateNotFound: package\snippets\resource_item.html

Here is some relevant content in my development.ini:

ckan.plugins = stats text_view image_view recline_view scheming_datasets repeating composite restricted
ckanext.restricted.some_setting = restricted.json

restricted.json is also listed below:

{
  "scheming_version": 1,
  "dataset_type": "dataset",
  "about": "",
  "about_url": "http://github.com/ckan/ckanext-scheming",
  "dataset_fields": [...],
  [...]
  "resource_fields": [
    {
      "field_name": "restricted",
      "label": "Access Restriction",
      "preset": "composite",
      "subfields": [{
          "field_name": "level",
          "label": "Level",
          "preset": "select",
          "form_include_blank_choice": false,
          "required": true,
          "choices": [{
              "value": "public",
              "label": "Public"
            },
            {
              "value": "registered",
              "label": "Registered Users"
            },
            {
              "value": "any_organization",
              "label": "Any Organization Members (Trusted Users)"
            },
            {
              "value": "same_organization",
              "label": "Same Organization Members"
            },
            {
              "value": "only_allowed_users",
              "label": "Allowed Users Only"
            }
          ]
        },
        {
          "field_name": "allowed_users",
          "label": "Allowed Users",
          "preset": "tag_string_autocomplete",
          "data-module-source": "/api/2/util/user/autocomplete?q=?"
        }
      ]
    }
  ]
}

Enabling this extension causes an internal server error when updating groups through the UI.

Hello,

I am running CKAN 2.7, and in my .ini file I only specify the following plugins:
ckan.plugins = stats text_view image_view recline_view scheming_datasets composite repeating restricted

When I go to edit a group (/group/edit/myGroup), and then click the "Update Group" button, I get an internal server error with the following traceback:
Capture

That obj tuple represents a tag named "Opportunities", and the first element in the tuple is its ID. I'm not sure why a tag object would pass through the restricted_package_show function?

This only occurs when I have the restricted extension enabled, and removing it causes the issue to go away.

Any assistance would be greatly appreciated!

AttributeError when submitting the request form with captcha

Everything is in the title

URL: http://127.0.0.1/dataset/presentation-2012/restricted_request_access/2b4fc8e6-b0a9-424c-9d51-6e28843721af
File '/usr/lib/ckan/venv/local/lib/python2.7/site-packages/weberror/evalexception.py', line 429 in respond
  app_iter = self.application(environ, detect_start_response)
File '/usr/lib/ckan/venv/local/lib/python2.7/site-packages/webob/dec.py', line 147 in __call__
  resp = self.call_func(req, *args, **self.kwargs)
File '/usr/lib/ckan/venv/local/lib/python2.7/site-packages/webob/dec.py', line 208 in call_func
  return self.func(req, *args, **kwargs)
File '/usr/lib/ckan/venv/local/lib/python2.7/site-packages/fanstatic/publisher.py', line 234 in __call__
  return request.get_response(self.app)
File '/usr/lib/ckan/venv/local/lib/python2.7/site-packages/webob/request.py', line 1053 in get_response
  application, catch_exc_info=False)
File '/usr/lib/ckan/venv/local/lib/python2.7/site-packages/webob/request.py', line 1022 in call_application
  app_iter = application(self.environ, start_response)
File '/usr/lib/ckan/venv/local/lib/python2.7/site-packages/webob/dec.py', line 147 in __call__
  resp = self.call_func(req, *args, **self.kwargs)
File '/usr/lib/ckan/venv/local/lib/python2.7/site-packages/webob/dec.py', line 208 in call_func
  return self.func(req, *args, **kwargs)
File '/usr/lib/ckan/venv/local/lib/python2.7/site-packages/fanstatic/injector.py', line 54 in __call__
  response = request.get_response(self.app)
File '/usr/lib/ckan/venv/local/lib/python2.7/site-packages/webob/request.py', line 1053 in get_response
  application, catch_exc_info=False)
File '/usr/lib/ckan/venv/local/lib/python2.7/site-packages/webob/request.py', line 1022 in call_application
  app_iter = application(self.environ, start_response)
File '/usr/lib/ckan/venv/src/ckan/ckan/config/middleware/pylons_app.py', line 262 in inner
  result = application(environ, start_response)
File '/usr/lib/ckan/venv/local/lib/python2.7/site-packages/beaker/middleware.py', line 73 in __call__
  return self.app(environ, start_response)
File '/usr/lib/ckan/venv/local/lib/python2.7/site-packages/beaker/middleware.py', line 156 in __call__
  return self.wrap_app(environ, session_start_response)
File '/usr/lib/ckan/venv/local/lib/python2.7/site-packages/routes/middleware.py', line 131 in __call__
  response = self.app(environ, start_response)
File '/usr/lib/ckan/venv/src/ckan/ckan/config/middleware/common_middleware.py', line 30 in __call__
  return self.app(environ, start_response)
File '/usr/lib/ckan/venv/src/ckan/ckan/config/middleware/common_middleware.py', line 56 in __call__
  return self.app(environ, start_response)
File '/usr/lib/ckan/venv/local/lib/python2.7/site-packages/pylons/wsgiapp.py', line 125 in __call__
  response = self.dispatch(controller, environ, start_response)
File '/usr/lib/ckan/venv/local/lib/python2.7/site-packages/pylons/wsgiapp.py', line 324 in dispatch
  return controller(environ, start_response)
File '/usr/lib/ckan/venv/src/ckan/ckan/lib/base.py', line 240 in __call__
  res = WSGIController.__call__(self, environ, start_response)
File '/usr/lib/ckan/venv/local/lib/python2.7/site-packages/pylons/controllers/core.py', line 221 in __call__
  response = self._dispatch_call()
File '/usr/lib/ckan/venv/local/lib/python2.7/site-packages/pylons/controllers/core.py', line 172 in _dispatch_call
  response = self._inspect_call(func)
File '/usr/lib/ckan/venv/local/lib/python2.7/site-packages/pylons/controllers/core.py', line 107 in _inspect_call
  result = self._perform_call(func, args)
File '/usr/lib/ckan/venv/local/lib/python2.7/site-packages/pylons/controllers/core.py', line 60 in _perform_call
  return func(**args)
File '/ckan-restricted/ckanext/restricted/controller.py', line 193 in restricted_request_access_form
  return self._send_request(context)
File '/ckan-restricted/ckanext/restricted/controller.py', line 131 in _send_request
  captcha.check_recaptcha(request)
File '/usr/lib/ckan/venv/src/ckan/ckan/lib/captcha.py', line 20 in check_recaptcha
  recaptcha_response_field = request.form.get('g-recaptcha-response', '')
File '/usr/lib/ckan/venv/local/lib/python2.7/site-packages/werkzeug/local.py', line 347 in __getattr__
  return getattr(self._get_current_object(), name)
File '/usr/lib/ckan/venv/local/lib/python2.7/site-packages/paste/registry.py', line 137 in __getattr__
  return getattr(self._current_obj(), attr)
File '/usr/lib/ckan/venv/local/lib/python2.7/site-packages/webob/request.py', line 1181 in __getattr__
  raise AttributeError(attr)
AttributeError: form

Simplify installation

I'm having trouble getting the plugin to work, mainly because of the required extensions that don't want to load despite trying to follow installation instructions (ckanext.scheming.errors.SchemingException: Could not load ckanext.repeating:presets.json , ImportError: No module named repeating.plugins, etc.). After a while of fiddling, I think I got dependencies installed, but now ckanext-scheming seems to simply override (instead of extending) my schema, meaning I'd have to redefine all core fields and other plugin fields...

The readme mentions that ckanext-scheming (and others) are recommended, but hints that there's another way.

Recommends the following extensions (otherwise the configuration is more complicated): * ckanext-scheming * ckanext-repeating * ckanext-composite

What is that more complicated way ?

Does it require modifying the schema using the update_config_schema() in a custom extension ? If so, wouldn't it be an option to do this in ckanext-restricted directly, instead of using ckanext-scheming and other dependencies ? Is there an example of such an implementation somewhere ?

It would be really nice if it was a bit easier to install this plugin by removing these dependencies.

Estimate to update with CKAN 2.9 ?

Hi,

We are a "final customer" of a CKAN version which embeds this package in a project that we use.

Is ti possible to update ckanext-restricted to make it works with CKAN 2.9 ?
We could finance the update.

Best Regards,

Jérôme Boutet
IDéO BFC
https://ideo.ternum-bfc.fr/

2.8

This extension appears to not be working on CKAN 2.8.

Error in running ckan -c /etc/ckan/default/ckan.ini run in extension

Hi, I've already installed ckanext-scheming, ckanext-repeating and ckanext-composite. Since I've installed the required extension I attemp to install ckanext-restricted after running ckan -c /etc/ckan/default/ckan.ini run this error occured

(default) root@ccgeo:/usr/lib/ckan/default/src/ckanext-restricted# ckan -c /etc/ckan/default/ckan.ini run
2021-11-18 08:42:25,310 INFO  [ckan.cli] Using configuration file /etc/ckan/default/ckan.ini
2021-11-18 08:42:25,310 INFO  [ckan.config.environment] Loading static files from public
2021-11-18 08:42:25,337 INFO  [ckan.config.environment] Loading templates from /usr/lib/ckan/default/src/ckan/ckan/templates
Traceback (most recent call last):
  File "/usr/lib/ckan/default/bin/ckan", line 11, in <module>
    load_entry_point('ckan', 'console_scripts', 'ckan')()
  File "/usr/lib/ckan/default/lib/python3.8/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/ckan/default/lib/python3.8/site-packages/click/core.py", line 781, in main
    with self.make_context(prog_name, args, **extra) as ctx:
  File "/usr/lib/ckan/default/lib/python3.8/site-packages/click/core.py", line 700, in make_context
    self.parse_args(ctx, args)
  File "/usr/lib/ckan/default/lib/python3.8/site-packages/click/core.py", line 1212, in parse_args
    rest = Command.parse_args(self, ctx, args)
  File "/usr/lib/ckan/default/lib/python3.8/site-packages/click/core.py", line 1048, in parse_args
    value, args = param.handle_parse_result(ctx, opts, args)
  File "/usr/lib/ckan/default/lib/python3.8/site-packages/click/core.py", line 1630, in handle_parse_result
    value = invoke_param_callback(self.callback, ctx, self, value)
  File "/usr/lib/ckan/default/lib/python3.8/site-packages/click/core.py", line 123, in invoke_param_callback
    return callback(ctx, param, value)
  File "/usr/lib/ckan/default/src/ckan/ckan/cli/cli.py", line 102, in _init_ckan_config
    ctx.obj = CkanCommand(value)
  File "/usr/lib/ckan/default/src/ckan/ckan/cli/cli.py", line 52, in __init__
    self.app = make_app(self.config)
  File "/usr/lib/ckan/default/src/ckan/ckan/config/middleware/__init__.py", line 56, in make_app
    load_environment(conf)
  File "/usr/lib/ckan/default/src/ckan/ckan/config/environment.py", line 123, in load_environment
    p.load_all()
  File "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 165, in load_all
    load(*plugins)
  File "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 179, in load
    service = _get_service(plugin)
  File "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 281, in _get_service
    return plugin.load()(name=plugin_name)
  File "/usr/lib/ckan/default/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2443, in load
    return self.resolve()
  File "/usr/lib/ckan/default/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2449, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/lib/ckan/default/lib/python3.8/site-packages/ckanext/restricted/plugin.py", line 15, in <module>
    from pylons import config
  File "/usr/lib/ckan/default/lib/python3.8/site-packages/pylons/__init__.py", line 8, in <module>
    from pylons.controllers.util import Request
  File "/usr/lib/ckan/default/lib/python3.8/site-packages/pylons/controllers/__init__.py", line 2, in <module>
    from pylons.controllers.core import WSGIController
  File "/usr/lib/ckan/default/lib/python3.8/site-packages/pylons/controllers/core.py", line 108
    except HTTPException, httpe:
                        ^
SyntaxError: invalid syntax

Did I miss something ?

The resource link is not restricted itself.

I have a strange problem in my version of the ckanext-restricted.
The restriction applies to the package view, however this does not apply for the resource link itself in ckan.
I mean if I go to a dataset page where a list of resources are given, for those resources with restrictions (assume I have no access to them), I need to request access. However, if I find the link of that resource (e.g. ckanwebpage.com/dataset/xxx/resource/yyyy) I can see the resource page. If that resource is a file uploaded in the system I cannot download that file but if it is a simple link to another page I can simply click and go to that page. This is however not a desirable behaviour. In fact, the ckan resource link should be blocked to unauthorized users.

resource view still accessible

Hello,

first of all many thanks for the great idea. The extension is very useful.

I have a very strange problem. I do not know whether it is me who missed some configurations or it is a bug.

I have a dataset with three resources. with the following restrictions:

  • 1 resource public;
  • 1 for the members of organization "A"; and
  • 1 only for myself.

I have another account with the role: "member " for Org. "A". I assume that I should be able to see the first two resources but not the third one.
In the dataset page, it looks as it is expected
image

However, when I click on the first resource ("SOS Client") and go down towards resources, I can simply click on the third resource and get the information.
image

The only thing which is not accessible is the preview of the resource.
can someone explain what is the reason and how I can resolve it?

Best regards
Mani

strange internal server error issue only if there is any attachments (resources)

I am on ckan 2.8.3
I just started using ckanext-scheming extension, as per instruction given in https://github.com/ckan/ckanext-scheming, very similar to schema given in https://raw.githubusercontent.com/ckan/ckanext-scheming/master/ckanext/scheming/camel_photos.json

Here is issue, suppose

  • if I add dataset (http://example.com/camel-photos/foo-dataset) without resources fields, I can read contents of dataset (http://example.com/camel-photos/foo-dataset) even after I logout.
  • but whereas if I edit dateset(http://example.com/camel-photos/foo-dataset) and then add resources fields (Photo, say 1 photo/document added ) -> hit update dataset -> finally logout, and then access (http://example.com/camel-photos/foo-dataset), I get internal server error why so

Its very unfortunate that, if I disable restricted extension in my development.ini, I am able to access dataset http://example.com/camel-photos/foo-dataset even after I logout.

If there is any attachment then I get below error

[Tue Nov 05 14:18:13.723092 2019] [:error] [pid 10452] [remote 192.168.56.1:160] Error - <type 'exceptions.TypeError'>: coercing to Unicode: need string or buffer, NoneType found
[Tue Nov 05 14:18:13.730001 2019] [:error] [pid 10452] [remote 192.168.56.1:160]   log.debug('restricted_package_show ' + resource.get('id','') + ', ' + resource.get('name','') + ' (' + str(resource.get('restricted', '')) + '): ' + str(authorized))
[Tue Nov 05 14:18:13.730012 2019] [:error] [pid 10452] [remote 192.168.56.1:160] TypeError: coercing to Unicode: need string or buffer, NoneType found

CKAN 2.7

Hi,

Is ckan-restricted compatible with CKAN 2.7 release?

m431m

Can't install ckanext-restricted using CKAN 2.9.4

Hello there,

This extension is what I'm looking for. I'm using Ckan 2.9.4 and I really want to try it but when I attempt to
install ckanext-restricted ( pip install ckanext-restricted ) I got a error

(default) ccgeo@ccgeo:~$ pip install ckanext-restricted
Collecting ckanext-restricted
  Downloading ckanext-restricted-0.0.2.tar.gz (13 kB)
Building wheels for collected packages: ckanext-restricted
  Building wheel for ckanext-restricted (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/lib/ckan/default/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-huch0oxb/ckanext-restricted/setup.py'"'"'; __file__='"'"'/tmp/pip-install-huch0oxb/ckanext-restricted/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-goi1l2p1
       cwd: /tmp/pip-install-huch0oxb/ckanext-restricted/
  Complete output (8 lines):
  /usr/lib/ckan/default/lib/python3.8/site-packages/setuptools/version.py:1: UserWarning: Module ckanext was already imported from /usr/lib/ckan/default/src/ckan/ckanext/__init__.py, but /tmp/pip-install-huch0oxb/ckanext-restricted is being added to sys.path
    import pkg_resources
  usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: setup.py --help [cmd1 cmd2 ...]
     or: setup.py --help-commands
     or: setup.py cmd --help
  
  error: invalid command 'bdist_wheel'
  ----------------------------------------
  ERROR: Failed building wheel for ckanext-restricted
  Running setup.py clean for ckanext-restricted
Failed to build ckanext-restricted
Installing collected packages: ckanext-restricted
    Running setup.py install for ckanext-restricted ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/lib/ckan/default/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-huch0oxb/ckanext-restricted/setup.py'"'"'; __file__='"'"'/tmp/pip-install-huch0oxb/ckanext-restricted/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-x52la8vn/install-record.txt --single-version-externally-managed --compile --install-headers /usr/lib/ckan/default/include/site/python3.8/ckanext-restricted
         cwd: /tmp/pip-install-huch0oxb/ckanext-restricted/
    Complete output (44 lines):
    /usr/lib/ckan/default/lib/python3.8/site-packages/setuptools/version.py:1: UserWarning: Module ckanext was already imported from /usr/lib/ckan/default/src/ckan/ckanext/__init__.py, but /tmp/pip-install-huch0oxb/ckanext-restricted is being added to sys.path
      import pkg_resources
    running install
    running build
    running build_py
    creating build
    creating build/lib
    creating build/lib/ckanext
    copying ckanext/__init__.py -> build/lib/ckanext
    creating build/lib/ckanext/restricted
    copying ckanext/restricted/plugin.py -> build/lib/ckanext/restricted
    copying ckanext/restricted/logic.py -> build/lib/ckanext/restricted
    copying ckanext/restricted/helpers.py -> build/lib/ckanext/restricted
    copying ckanext/restricted/controller.py -> build/lib/ckanext/restricted
    copying ckanext/restricted/__init__.py -> build/lib/ckanext/restricted
    creating build/lib/ckanext/restricted/tests
    copying ckanext/restricted/tests/test_plugin.py -> build/lib/ckanext/restricted/tests
    copying ckanext/restricted/tests/__init__.py -> build/lib/ckanext/restricted/tests
    running egg_info
    writing ckanext_restricted.egg-info/PKG-INFO
    writing dependency_links to ckanext_restricted.egg-info/dependency_links.txt
    writing entry points to ckanext_restricted.egg-info/entry_points.txt
    writing top-level names to ckanext_restricted.egg-info/top_level.txt
    reading manifest file 'ckanext_restricted.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: no files found matching '*.json' under directory 'ckanext/restricted'
    warning: no files found matching '*.js' under directory 'ckanext/restricted'
    warning: no files found matching '*.less' under directory 'ckanext/restricted'
    warning: no files found matching '*.mo' under directory 'ckanext/restricted'
    writing manifest file 'ckanext_restricted.egg-info/SOURCES.txt'
    creating build/lib/ckanext/restricted/public
    copying ckanext/restricted/public/restricted_theme.css -> build/lib/ckanext/restricted/public
    creating build/lib/ckanext/restricted/templates
    copying ckanext/restricted/templates/base.html -> build/lib/ckanext/restricted/templates
    creating build/lib/ckanext/restricted/templates/package
    creating build/lib/ckanext/restricted/templates/package/snippets
    copying ckanext/restricted/templates/package/snippets/resource_item.html -> build/lib/ckanext/restricted/templates/package/snippets
    creating build/lib/ckanext/restricted/templates/restricted
    copying ckanext/restricted/templates/restricted/restricted_request_access_base.html -> build/lib/ckanext/restricted/templates/restricted
    copying ckanext/restricted/templates/restricted/restricted_request_access_form.html -> build/lib/ckanext/restricted/templates/restricted
    copying ckanext/restricted/templates/restricted/restricted_request_access_result.html -> build/lib/ckanext/restricted/templates/restricted
    running install_lib
    creating /usr/lib/ckan/default/lib/python3.8/site-packages/ckanext
    error: could not create '/usr/lib/ckan/default/lib/python3.8/site-packages/ckanext': Permission denied
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/lib/ckan/default/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-huch0oxb/ckanext-restricted/setup.py'"'"'; __file__='"'"'/tmp/pip-install-huch0oxb/ckanext-restricted/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-x52la8vn/install-record.txt --single-version-externally-managed --compile --install-headers /usr/lib/ckan/default/include/site/python3.8/ckanext-restricted Check the logs for full command output.

Need advice. Thankyou

Access request : improve granting access workflow

Hi !

The issue is that the maintainer/author isn't necessarily a CKAN user, so that it's not helpful for him/her to get a message for access requests.

I think we should use the dataset owner's email instead (the person who created the package in the first place). And if needed, we could add another field to choose which user (amongst those who have edit rights to the resources) should get the access request.

In an ideal world, all editors would get access requests emails (optionally muteable), and there would be a page in the UI showing all pending access requests.

Alternatively, if we want to keep the ability for external authors to grant access to resources, we should put a "grant access" link in the email, with some secret token, allowing to grant access without even requiring a login.

Thanks !

ERROR[500]

Hi, I'm using CKAN 2.9.4 after installing ckanext-restricted the prerequisite of it. When I clicked dataset it say error [500] and page redirect in a page without css.

error500

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.