Permission Admin

This topic contains 1 reply, has 2 voices, and was last updated by  Stephen Harris 11 years, 1 month ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #5282

    Hello Stephen,

    I have a problem with the permissions. I did something stupid. I changed the permissions of the admin role (although I’m not blond) and now the admin can’t create, edit or delete events anymore. Can you help me, so I can specify the admin role again?

    Greetings of a dutch girl living in Germany,
    Sandra Riemersma

    PS do you need access data?

    lekkerdesign
    #5283

    Not sure how you managed that – admin options are disabled and the plug-in shouldn’t update them. Did you change it via another plug-in?

    If you can’t see the Settings > Event Organiser page then you’re admins don’t have the ‘manage_options’ capability either.

    Anyhow to get the permissions back copy the following into your theme’s functions.php. Then reload the page, check its worked, and remove it again.

    $caps = array(
         'edit_events' => __( 'Edit Events', 'eventorganiser' ),
         'publish_events' => __( 'Publish Events', 'eventorganiser' ),
          'delete_events' => __( 'Delete Events', 'eventorganiser' ),
         'edit_others_events' => __( 'Edit Others\' Events', 'eventorganiser' ),
          'delete_others_events' => __( 'Delete Other\'s Events', 'eventorganiser' ),
         'read_private_events' => __( 'Read Private Events', 'eventorganiser' ),
          'manage_venues' => __( 'Manage Venues', 'eventorganiser' ),
          'manage_event_categories' => __( 'Manage Event Categories & Tags', 'eventorganiser' ),
    );
    $role = $wp_roles->get_role( 'administrator' );
    foreach ( $caps as $eo_role => $eo_role_display ){
         $role->add_cap( $eo_role );        
    }
    
    Stephen Harris
Viewing 2 posts - 1 through 2 (of 2 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.