PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Roles and Capabilities for Importing/Exporting Entries/Forms the same?

  1. UWEX
    Member

    In our network, we're trying to give some site admins the ability to edit and export ENTRIES, but not deal with the actual forms themselves. As best I can tell, there is a single capability for all these: gravityforms_export_entries. This means that if I let someone export entries, they're also allowed to import forms? These capabilities don't seem like they should be tied together - am I missing something?

    (Also, this page http://www.gravityhelp.com/documentation/page/Role_Management looks a little out of date, because when I dump the capabilities in the network, I'm getting more than are listed here.)

    Thanks!

    Posted 12 years ago on Thursday December 1, 2011 | Permalink
  2. UWEX
    Member

    On a related note, this custom plugin for denying access to non-network admins has stopped working with the upgrade to 1.6. Any ideas?

    add_filter('user_has_cap', 'abc_gravity_forms_modifier_capabilities', 5, 3);
    function abc_gravity_forms_modifier_capabilities($allcaps, $cap, $args) {
    	if (is_super_admin()) {
    		return $allcaps;
    	} else {
    		$allcaps['gravityforms_create_form'] = false;
                 //few other ones here...
    	}
    	return $allcaps;
    }
    Posted 12 years ago on Thursday December 1, 2011 | Permalink
  3. It appears new capabilities were not added for exporting forms and importing forms. We will take a look and see what needs to change to make the capabilities more granular. Right now it's relying on that capability to show or hide the Import/Export navigation item itself, as well as protecting the content.

    So we'll have to 1) add the new capabilities specific to export forms and import forms and then 2) make necessary changes where appropriate to support these new capabilities. We till take a look and include these updates in a future release. It's too late to include it in the 1.6.2 release which is being wrapped up as I type.

    I don't see anything obviously wrong with the code you are using to set the capabilities. Nothing changed with the capabilities in 1.6 and we don't have any reports of users having problems using things like the Members plugin to manage capabilities using Gravity Forms v1.6+.

    I would suggest taking a look at the code you have implemented, see if you can figure out what is going on and if you need additional help figuring out the issue with how you are setting capabilities manually... we can dig deeper on it.

    Posted 12 years ago on Thursday December 1, 2011 | Permalink
  4. UWEX
    Member

    Carl -
    It turns out there is yet another hidden capability: gforms_full_access?

    I had to explicitly set that to false in order to make any of the other capabilities even matter, and then it started working.

    As for the import/export capabilities, I really do think there needs to be a distinction between Forms and Entries, so they deserve their own capabilities. Thanks for looking into it!

    Posted 12 years ago on Thursday December 1, 2011 | Permalink
  5. Thanks for the update. I agree, and updating the capabilities is something we plan on adding.

    Posted 12 years ago on Friday December 2, 2011 | Permalink

This topic has been resolved and has been closed to new replies.