• Resolved redsk

    (@redsk)


    Hi,

    I’m a user of this plugin and I manage a wordpress site for a Marie Curie European research project. First of all, thank you very much for your work.

    A feature we are missing is the ability for non-admin users to create meetings and manage recordings. Do you plan to add this feature?

    Thank you very much

    https://www.ads-software.com/plugins/bigbluebutton/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter redsk

    (@redsk)

    Hi,

    I was in a hurry so I hacked the code to get this result. The result is that meetings can be added and managed with the same permissions the recordings can be managed. To do so, I modified the file bigbluebutton-plugin.php.

    First of all, I added two more shortcodes (add the following two lines after line 68):

    add_shortcode('bigbluebutton_create_meetings', 'bigbluebutton_create_meetings_shortcode');
    add_shortcode('bigbluebutton_list_meetings', 'bigbluebutton_list_meetings_shortcode');

    Then, I added the following three functions (add this block after the function bigbluebutton_recordings_shortcode(), after line 382):

    function bigbluebutton_create_meetings_shortcode() {
      if ( bigbluebutton_can_manageRecordings(get_bbb_role()) ) {
          return bigbluebutton_create_meetings();
      }
      //else {
      //    echo "You don't have permissions to access this page.";
      //}
    }
    
    function bigbluebutton_list_meetings_shortcode() {
      if ( bigbluebutton_can_manageRecordings(get_bbb_role()) ) {
          return bigbluebutton_list_meetings();
      }
      //else {
      //    echo "You don't have permissions to access this page.";
      //}
    }
    
    function get_bbb_role() {
        global $wpdb, $wp_roles, $current_user;
        $role = null;
        if( $current_user->ID ) {
            $role = "unregistered";
            foreach($wp_roles->role_names as $_role => $Role) {
                if (array_key_exists($_role, $current_user->caps)){
                    $role = $_role;
                    break;
                }
            }
        } else {
            $role = "anonymous";
        }
    
        return $role;
    }

    Now, you can simply create a page like this:

    [bigbluebutton_create_meetings]
    
    [bigbluebutton_list_meetings]
    
    [bigbluebutton_recordings title="List of recordings"]
    
    [bigbluebutton]

    Allowed users will be able to manage meetings and recordings. Unregistered users will only be able to view recordings.

    HTH
    Nico

    Plugin Author J Federico

    (@jfederico)

    Thanks again Nico,

    Great contribution, I’ll take a look. We have been working for a while on a different version based on custom content types. This will solve the problem with permissions too, but in the meanwhile your contribution could solve troubles other folks have now.

    I’ll take a look and run some tests, your code may be part of the next release as well.

    Thanks again

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘allow non-admins to create meeting rooms and manage recordings’ is closed to new replies.