Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for your question.

    This is not directly possible in the “Plugin Options” of WP-Table Reloaded at this time, to not add a possible security risk (e.g. if an admin accidentally opens the plugin for Subscribers, which is the role that every registered user gets).
    You could however achieve this by using the plugin filter “wp_table_reloaded_min_needed_capability” which would need to return for example “read” as the minimum capability that is required to access the plugin.

    Regards,
    Tobias

    Thread Starter tglass118

    (@tglass118)

    Thanks. I’m a relative newbie and don’t understand how to implement your suggestion. My problem is Contributors (the minimum role available to edit a table) have more privileges than I want them to have, like changing the theme.

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    yes, that’s correct about the Contributors role.

    The code that I meant looks like this:

    function wp_table_reloaded_min_needed_capability_read( $cap ) {
      $cap = 'read';
      return $cap;
    }
    add_filter( 'wp_table_reloaded_min_needed_capability', 'wp_table_reloaded_min_needed_capability_read' );

    You can either paste it into your theme’s “functions.php” or create a new “Plugin Extension” with it (see https://tobias.baethge.com/wordpress-plugins/wp-table-reloaded-english/extensions/ )

    Best wishes,
    Tobias

    Thread Starter tglass118

    (@tglass118)

    Thanks, Tobias. I pasted it into functions.php and it seems to work. Now Contributors can only post, and edit the table. I appreciate the help.
    Ted

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi Ted,

    great, thanks for the confirmation!

    But just to clarify: This code allows “Subscribers” to edit tables! By default, “Subscribers” are not allowed to add/edit posts though!

    If you really wanted this for “Contributors” and not “Subscribers” (as you said in the initial post), you must not use this code, but simply select “Contributors” in the drop down for “Plugin Access” on the “Plugin Options” screen of WP-Table Reloaded!

    Regards,
    Tobias

    Thread Starter tglass118

    (@tglass118)

    Hi Tobias,
    Thanks for the clarification. I didn’t realize this was the case. I don’t really want Subscribers to edit tables. What would be best would be to restrict Contributors to editing tables only, and not add/edit posts. Is this possible? Many thanks for your attention.
    Ted

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi Ted,

    First: Thanks for your donation, I really appreciate it!

    I don’t have too much experience with this, but I believe the “Members” plugin (https://www.ads-software.com/extend/plugins/members/) allows one to edit the capabilities of existing user roles. This should make it possible to take post editing away from Contributors.
    Subscribers can then be kept at the reading level, as it’s the default.

    And of course you should always create test users with the user roles in question and check if the capabilities are really set as expected.

    Best wishes,
    Tobias

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Plugin: WP-Table Reloaded] Front edit editing user level’ is closed to new replies.