Deleting spam group

David Read edited this page Jan 7, 2015 · 1 revision

Here are some ways to purge a group called 'hacked-by-slayers-hack-team' (which is not a hack at all, simply spam/graffiti).

Using SQL

On your server run:

$ psql ckan -c "DELETE from WHERE name='hacked-by-slayers-hack-team'; DELETE from group_revision WHERE name='hacked-by-slayers-hack-team';"

Using API/curl

Or if you have CKAN 2.2 or later you can do this: (replace the host with your own CKAN server and put in your sysadmin's API key)

$ curl -H 'Authorization:yourAPIkeyhere'

Using Paster shell

Alternatively you'll need to use paster shell:

$ paster --plugin=pylons shell /var/ckan/ckan.ini

g = model.Group.get('hacked-by-slayers-hack-team') assert g (check there is not an error) g.delete() model.repo.new_revision() model.repo.commit_and_remove() model.Group.get('hacked-by-slayers-hack-team') assert not model.Group.get('hacked-by-slayers-hack-team') (check there is not an error)

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.