How to define custom permissions for organic groups?
I found the solution here: 

/**
 * Implements hook_og_permission().
 */
function custom_permissions_og_permission() {
  $name = "taks";
  return array(
    'update own task content' =&gt; array(
      'title' =&gt; t('Update own %type_name content', array('%type_name' =&gt; $name)),
      'description' =&gt; t("Edit own %type_name content.", array('%type_name' =&gt; $name)),
      // Determine to which role to limit the permission. For example the
      // "subscribe" can't be assigned only to a non-member, as a member doesn't
      // need it.
      'roles' =&gt; array(OG_AUTHENTICATED_ROLE, OG_ADMINISTRATOR_ROLE),
      // Determine to which roles the permissions will be enabled by default.
      'default role' =&gt; array(OG_AUTHENTICATED_ROLE, OG_ADMINISTRATOR_ROLE),
    ),
    'update any task content' =&gt; array(
      'title' =&gt; t('Update any %type_name content', array('%type_name' =&gt; $name)),
      'description' =&gt; t("Edit any %type_name content.", array('%type_name' =&gt; $name)),
      'roles' =&gt; array(OG_AUTHENTICATED_ROLE, OG_ADMINISTRATOR_ROLE),
      'default role' =&gt; array(OG_ADMINISTRATOR_ROLE),
    ),
    'create new task content' =&gt; array(
      'title' =&gt; t('Create new %type_name content', array('%type_name' =&gt; $name)),
      'description' =&gt; t("Create new %type_name content.", array('%type_name' =&gt; $name)),
      'roles' =&gt; array(OG_AUTHENTICATED_ROLE, OG_ADMINISTRATOR_ROLE),
      'default role' =&gt; array(OG_ADMINISTRATOR_ROLE),
    ),
  );
}