Hi,

I was working with your module. First of all, congratulations for it, it's a very good and usable module.

In the project we're working, we need to delete all terms before a new import is made, because our we thought that in the case the new file imported has terms deleted from the last import, they will already appear, and we don't want them to appear more in the application.

I'll implement a basic solution adding a submit function before the import ones to delete all terms for the vocabulary, but it would be great to have an option to delete all before import.

Also we need to give permissions to a role only for import, and we didn't want to give him the administer taxonomy perm, so we made a hook_menu_alter to modify the admin/content/taxonomy/csv_import access callback and access arguments, and add own perms, maybe is an idea to improve module permissions in the future. Sorry for my english, if you don't understand something, please let me know to try to explain it better.

Thanks in advance,

CommentFileSizeAuthor
#5 patch.txt1.42 KBericpalace

Comments

Daniel_KM’s picture

Priority: Major » Normal

Hi,

Thank you for your congratulations.

I'm going to add a "delete option" in the vocabulary group of options. Currently, I use devel generate sub-module, part of Devel (which allows to generate items, but also to delete).

About permissions, there was a specific access right in an old previous release, but it appeared not very useful because Taxonomy csv is designed as a one time module: you use it then you uninstall it (see remarks about differences with Taxonomy builder api).
Nevertheless I can reintroduce it. I can commit your code if you publish it here or if you send it to me.

Sincerely,

Daniel Berthereau
Infodoc, Digital humanities & Knowledge management

Daniel_KM’s picture

Version: 6.x-5.6 » 6.x-5.x-dev
Status: Active » Needs work

Hi,

I've just committed a patch to allow deletion of terms before an import for 6.x-5.x and 7.x-5.x dev releases.

For permissions, I wait your patch.

Sincerely,

Daniel Berthereau
Infodoc, Digital humanities & Knowledge management

Daniel_KM’s picture

Title: Option to delete all terms from the vocabulary and import on scratch » Specific access rights and option to delete all terms from the vocabulary
ericpalace’s picture

Hi Daniel,

Thanks for you new release, I've updated the module right now in my project, and delete all the code that was doing this, jeje!

I'll post my patch when I've a little bit of time for this.

Many thanks another time!!!

ericpalace’s picture

StatusFileSize
new1.42 KB

Here you have the patch.

I added:
hook_menu_alter to modify the user_access of you menu options
hook_perm to add new perms for import and export
function to call from the import menu when access
function to call from the export menu when access

I hope it helps you!!! Anything please contact me!

Daniel_KM’s picture

Hi,

Thanks for your patch. I'm going to commit it in the beginning of December.

Sincerely,

Daniel Berthereau
Infodoc & Knowledge management

Daniel_KM’s picture

Status: Needs work » Fixed

Hi,

I commited your patch. Note that I simplified it, because I don't need to alter my own menu...

Sincerely

Daniel Berthereau
Infodoc & Knowledge management

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.