尝试使用以下信息:
http://docs.ckan.org/en/ckan-1.4.3/authorization.html
创建用户并为特定包分配角色,命令正确不起作用。
例如:
paster --plugin=ckan rights -c /etc/ckan/default/development.ini list
我收到错误:
Command 'rights' not known (you may need to run setup.py egg_info)
Known commands:
celeryd Celery daemon [DEPRECATED]
check-po-files Check po files for common mistakes
color Create or remove a color scheme.
config-tool Tool for editing options in a CKAN config file
create Create the file layout for a Python distribution
create-test-data Create test data in the database.
datapusher Perform commands in the datapusher
dataset Manage datasets
datastore Perform commands to set up the datastore
db Perform various tasks on the database.
exe Run #! executable files
front-end-build Creates and minifies css and JavaScript files
help Display help
jobs Manage background jobs
less Compile all root less documents into their CSS counterparts
make-config Install a package and create a fresh config file/directory
minify Create minified versions of the given Javascript and CSS files.
notify Send out modification notifications.
plugin-info Provide info on installed plugins.
points Show information about entry points
post Run a request for the described application
profile Code speed profiler
ratings Manage the ratings stored in the db
rdf-export Export active datasets as RDF
request Run a request for the described application
search-index Creates a search index for all datasets
serve Serve the described application
setup-app Setup an application, given a config file
sysadmin Gives sysadmin rights to a named user
tracking Update tracking statistics
trans Translation helper functions
user Manage users
views Manage resource views.
但如果我创建这样的用户:
paster sysadmin add seanh -c /etc/ckan/default/development.ini
工作正常,所以我认为这个问题不在我的环境中。
注意:
Centos 7.4
ckan 2.7.3
感谢
答案 0 :(得分:2)
'版权'在迁移到CKAN 2.X时已弃用,并且删除了paster命令。
从CKAN 2.0开始,权限按组织和组别进行组织。它是一种简化,适用于被认为是最常见的用例。
但是,如果您需要控制单个数据集(而不是组织/组中的所有数据集)的用户权限,那么该数据集需要在组织或组中独立存在。或者您可以使用IAuthFunctions自定义auth系统。