public/wordpress/wp-content/plugins/h5p/public/class-h5p-wordpress.php
/**
   * Implements hasPermission
   *
   * @method hasPermission
   * @param  H5PPermission    $permission
   * @param  int              $contentUserId
   * @return boolean
   */
Implements hasPermission
@method hasPermission
@param  H5PPermission    $permission
@param  int              $contentUserId
@return boolean
Implements hasPermission @method hasPermission @param H5PPermission $permission @param int $contentUserId @return boolean
public function hasPermission($permission, $contentUserId = NULL) {
    switch ($permission) {
      case H5PPermission::DOWNLOAD_H5P:
      case H5PPermission::EMBED_H5P:
      case H5PPermission::COPY_H5P:
        return self::currentUserCanEdit($contentUserId);
      case H5PPermission::CREATE_RESTRICTED:
      case H5PPermission::UPDATE_LIBRARIES:
        return current_user_can('manage_h5p_libraries');
      case H5PPermission::INSTALL_RECOMMENDED:
        current_user_can('install_recommended_h5p_libraries');
    }
    return FALSE;
  }
public function hasPermission ( $ permission , $ contentUserId = NULL ) { switch ( $ permission ) { case H5PPermission :: DOWNLOAD_H5P : case H5PPermission :: EMBED_H5P : case H5PPermission :: COPY_H5P : return self :: currentUserCanEdit ( $ contentUserId ) ; case H5PPermission :: CREATE_RESTRICTED : case H5PPermission :: UPDATE_LIBRARIES : return current_user_can ( 'manage_h5p_libraries' ) ; case H5PPermission :: INSTALL_RECOMMENDED : current_user_can ( 'install_recommended_h5p_libraries' ) ; } return FALSE ; }
Implements hasPermission
 @method hasPermission
 @param  H5PPermission    $permission
 @param  int              $contentUserId
 @return boolean
Implements hasPermission @method hasPermission @param H5PPermission $permission @param int $contentUserId @return boolean