Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello,
I would like to enable plain users to export / import their nodes.
Export works fine, yet to import, you need to be an admin.
Could we have a lightweight import tab in addition to the import link?
Comments
Comment #1
danielb CreditAttribution: danielb commentedYou can add your own menu link to admin/content/import, or give them permission to access administration pages, without giving all the permissions that comes with being an admin.
Comment #2
giorgio79 CreditAttribution: giorgio79 commentedAny tips on adding it next to the Export tab on node pages? :)
I think that would require custom coding.
Comment #3
danielb CreditAttribution: danielb commentedYes it would require your own hook_menu implementation, but it doesn't make sense there because those are meant to be options for that particular node.
I guess you will also need the 'administer nodes' permission to see the list of nodes after import - but that's the game you're playing with this module, they should be someone who can do that anyway.
Comment #4
giorgio79 CreditAttribution: giorgio79 commentedIt will be only their nodes they created. So the uid will be the current user, so no administer nodes permission :)
I think there is a viable use case though for non admins importing / expoting only their own nodes.
I see there is permission for exporting own nodes though :)
Comment #5
danielb CreditAttribution: danielb commentedI will reconsider the permissions and where you get redirected after import for the next version, but I still don't think the tab is a good idea.
Comment #6
giorgio79 CreditAttribution: giorgio79 commentedYep, instead of the tab perhaps a separate menu item in the navigation would do it too. :)
It could even be a separate, toned done page (perhaps at /content/import) without the link to the Node Export settings for plain users.
As I understand, any page with /admin requires admin permissions, which wont be granted for plain authenticated users.
Comment #7
danielb CreditAttribution: danielb commentedGood points, I will open this to remind me to think about that. I don't think you do need admin permissions to go to a path starting with admin/ but, it does seem like that may not be the best place for it.
Perhaps under node/add (create content) ??
Comment #8
giorgio79 CreditAttribution: giorgio79 commentedYes, that sounds good, sg like /node/add/import, or simply /node/import.
PS
Although /node/add/import might conflict with CCK if someone has a content type named Import
Comment #9
danielb CreditAttribution: danielb commentedI've made these changes in the 3.x branch.
Comment #10
giorgio79 CreditAttribution: giorgio79 commentedFantastic, thanks. Look forward to the release :)