You are here

function _opigno_moxtra_set_meeting_permissions in Opigno Moxtra 3.x

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

Set meeting permissions.

1 call to _opigno_moxtra_set_meeting_permissions()
opigno_moxtra_install in ./opigno_moxtra.install
Implements hook_install().

File

./opigno_moxtra.install, line 45
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
    ->grantPermission('score meeting');
  $role
    ->save();

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

  // Allow platform-level user managers to score LM entities.
  $role = Role::load('user_manager');
  $role
    ->grantPermission('score meeting');
  $role
    ->save();
}