未提供项目描述
项目描述
ckanext-vip-portal
为匿名用户提供通用访问限制。
配置匿名用户可访问的集合或端点/URL,如果尝试访问未经白名单的页面,则重定向到登录页面。
需求
与核心CKAN版本的兼容性
CKAN版本 | 兼容? |
---|---|
2.9 | 是 |
2.10 | 是 |
2.11(master) | 是 |
安装
要安装 ckanext-vip-portal
-
使用pip进行安装
pip install ckanext-vip-portal
-
将
vip_portal
添加到您的CKAN配置文件中的ckan.plugins
设置。
配置设置
# Configure endpoint that handles unauthorized page access
# (optional, default: user.login)
ckanext.vip_portal.login_endpoint = auth_ext.login
# Allow anonymous access to all the pages. It basically disables current
# extensions
# (optional, default: false)
ckanext.vip_portal.free_anonymous_access = true
# Allow any authenticated user to visit pages normally
# (optional, default: true)
ckanext.vip_portal.free_authenticated_access = false
# Unless endpoint is blocked by one of IVipAccess implementations, it can be
# accessed by anyone. Use it in combination with IVipPortal interface if you
# want to leave the portal generally open and block only certain endpoints
# (optional, default: false)
ckanext.vip_portal.free_access_by_default = true
# Allow anonymous access to login pages
# (optional, default: true)
ckanext.vip_portal.allow_login = false
# Allow anonymous access to password reset page
# (optional, default: true)
ckanext.vip_portal.allow_password_reset = false
# Allow anonymous access to registration pages
# (optional, default: true)
ckanext.vip_portal.allow_registration = false
# Allow anonymous access to API endpoints
# (optional, default: true)
ckanext.vip_portal.allow_api = false
# Additional endpoints that are accessible by anonymous user
# (optional, default: )
ckanext.vip_portal.extra_allowed_endpoints = home.index home.about dataset.search
# Additional paths(URLs) that are accessible by anonymous user
# (optional, default: )
ckanext.vip_portal.extra_allowed_paths = / /about /dataset
# Allow anonymous user to access any path that starts with the following
# prefixes
# (optional, default: )
ckanext.vip_portal.extra_allowed_prefixes = /dataset /organization /group /static
# Allow anonymous user to access any path that ends with the following
# suffixes
# (optional, default: )
ckanext.vip_portal.extra_allowed_suffixes = .svg .html .css
# Allows to customize the route that the user will get redirected to
# after a successful login. Empty value allow user to be redirected to the page
# requested before displaying login page
# (optional, default: )
ckan.auth.route_after_login = dataset.search
开发者安装
要为开发安装 ckanext-vip-portal
,请激活您的CKAN虚拟环境并执行以下操作:
git clone https://github.com/DataShades/ckanext-vip-portal.git
cd ckanext-vip-portal
pip install -e '.[dev]'
许可协议
项目详情
下载文件
下载适合您平台的文件。如果您不确定选择哪个,请了解有关 安装包 的更多信息。
源分发
ckanext-vip-portal-0.2.4.tar.gz (20.7 kB 查看哈希值)
构建分发版
关闭
ckanext-vip-portal-0.2.4.tar.gz的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 37fb030b8b455bb8f8a26f2c7fe78c38462929b576d4251c95b66e12f60c7ea7 |
|
MD5 | d602d68a29bd4376199b91a4ec1d28a6 |
|
BLAKE2b-256 | b4e0020cd151e17e06c0bafbc62497d8e7c9672e70262511e5bbf29a0d1afbd3 |
关闭
ckanext_vip_portal-0.2.4-py3-none-any.whl的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 4fa697f43f52040a0e45edb9bda9bf2f7dbe75a53a3e5af720646846e5c754cf |
|
MD5 | 6fb9a721ea660c351ef918cb45e1df83 |
|
BLAKE2b-256 | aa5e2978b61dbb97ded6541f1642c5c773bcd6182626a8f93f89d31786d7239a |