You are here

function _opigno_moxtra_set_meeting_permissions in Opigno Moxtra 8

Same name and namespace in other branches
  1. 3.x opigno_moxtra.install \_opigno_moxtra_set_meeting_permissions()

Set meeting permissions.

2 calls to _opigno_moxtra_set_meeting_permissions()
opigno_moxtra_install in ./opigno_moxtra.install
Creates the collaborative workspace field in a training groups.
opigno_moxtra_update_8016 in ./opigno_moxtra.install
Grand permissions for Content manager global role. Grant permission to view meeting for auth users. Grand permissions for collaborative_features role.

File

./opigno_moxtra.install, line 42
Install, update and uninstall functions for the Opigno Moxtra module.

Code

function _opigno_moxtra_set_meeting_permissions() {

  // Allow content managers to start meeting.
  $role = Role::load('content_manager');
  $role
    ->grantPermission('start meeting');
  $role
    ->save();

  // Allow live meeting managers to start meeting.
  $role = Role::load('collaborative_features');
  $role
    ->grantPermission('start meeting');
  $role
    ->save();

  // Allow users to view ILT entities.
  $role = Role::load(RoleInterface::AUTHENTICATED_ID);
  $role
    ->grantPermission('view meeting entities');
  $role
    ->save();
}