• Resolved HelgaTheViking

    (@helgatheviking)


    I want to give a user with the Editor role, special access to control Ninja Forms without upgrading them to an Admin. What are the capabilities needed?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi there,

    You’ll need their User Management plugin to grant the following access privileges to your Editor user. However, if you’re looking to assign specific access or roles to an individual user, it is not possible. I tried some custom code before but had no luck.

    Thread Starter HelgaTheViking

    (@helgatheviking)

    That appears to only be available via an extension

    Looks like there are lots of places where manage_options (typically a capability only admins have) is checked, but there also seems to be a check on nf_edit_forms….

    /**
    * Check if current user can manage forms
    *
    * @return bool
    */
    function ninja_forms_ability_can_manage_forms() {
    if ( current_user_can( 'manage_options' ) || current_user_can( 'nf_edit_forms' ) ) {
    return true;
    }

    return new \WP_Error(
    'rest_forbidden',
    __( 'Sorry, you are not allowed to manage Ninja Forms.', 'ninja-forms' )
    );
    }

    I gave my user this cap though and he still can’t edit forms.

    Thread Starter HelgaTheViking

    (@helgatheviking)

    is there a place to log this as a feature request? I seem to recall NF’s git reponis self-hosted. I’m a little shocked it hasnt come up before.

    Plugin Support Mia

    (@xmiax)

    Hi

    You can use our contact page to submit feature requests. If you reach out please include you forum username so I see it.

    For the record we can’t support code changes you make yourself.

    Mia

    Thread Starter HelgaTheViking

    (@helgatheviking)

    I also came up with this solution:
    https://gist.github.com/helgatheviking/7a57bf77705304fb8147b44681367c3e

    It just seems drastically overkill.

Viewing 5 replies - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.