Skip to content

Commit

Permalink
Issue backdrop-contrib#118. Create layout access plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
argiepiano committed May 26, 2022
1 parent b6c8794 commit 04f8258
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 221 deletions.
13 changes: 13 additions & 0 deletions og.module
Original file line number Diff line number Diff line change
Expand Up @@ -3880,9 +3880,22 @@ function og_autoload_info() {
'OgBehaviorHandler' => 'plugins/entityreference/behavior/OgBehaviorHandler.class.php',
'OgWidgetHandler' => 'plugins/entityreference/behavior/OgWidgetHandler.class.php',
'OgSelectionHandler' => 'plugins/entityreference/selection/OgSelectionHandler.class.php',
'OgNodeGroupLayoutAccess' => 'plugins/access/OgNodeGroupLayoutAccess.class.php',
'OgMemberLayoutAccess' => 'plugins/access/OgMemberLayoutAccess.class.php',
'OgPermLayoutAccess' => 'plugins/access/OgPermLayoutAccess.class.php',
'OgNodeGroupContentLayoutAccess' => 'plugins/access/OgNodeGroupContentLayoutAccess.class.php',
'og_context' => 'includes/og_context.inc',
'og_context_required' => 'includes/og_context.inc',
'og_context_optional' => 'includes/og_context.inc',
'OgTestBase' => 'tests/og.test',
);
}

/**
* Implements hook_layout_api().
*/
function og_layout_api() {
return array(
'file' => 'includes/og.layout.inc',
);
}
44 changes: 0 additions & 44 deletions og.og.inc
Original file line number Diff line number Diff line change
Expand Up @@ -13,50 +13,6 @@

function og_og_info() {
$info = array(
'access' => array(
'og_is_node_group_content' => array(
'title' => t("OG: Node is an OG group content"),
'description' => t('Control access by whether or not a node is of type "Group content".'),
'callback' => 'og_is_node_group_content_check',
'summary' => 'og_is_node_group_content_summary',
'required context' => new og_context_required(t('Node'), 'node'),
'file' => 'plugins/access/og_is_node_group_content.inc',
),
'og_is_node_group' => array(
'title' => t("OG: Node is an OG group"),
'description' => t('Control access by whether or not a node is of type "Group".'),
'callback' => 'og_is_node_group_check',
'summary' => 'og_is_node_group_summary',
'required context' => new og_context_required(t('Node'), 'node'),
'file' => 'plugins/access/og_is_node_group.inc',
),
'og_member' => array(
'title' => t("OG: user membership in group"),
'description' => t('Control access by group membership.'),
'callback' => 'og_member_access_check',
'default' => array('state' => OG_STATE_ACTIVE),
'settings form' => 'og_member_access_settings',
'summary' => 'og_member_access_summary',
'required context' => array(
new og_context_required(t('User'), 'user'),
new og_context_required(t('Node'), 'node'),
),
'file' => 'plugins/access/og_member.inc',
),
'og_perm' => array(
'title' => t("OG: user permission in group"),
'description' => t('Control access by group permission string.'),
'callback' => 'og_perm_access_check',
'default' => array('perm' => ''),
'settings form' => 'og_perm_access_settings',
'summary' => 'og_perm_access_summary',
'required context' => array(
new og_context_required(t('User'), 'user'),
new og_context_required(t('Node'), 'node'),
),
'file' => 'plugins/access/og_perm.inc',
),
),
'relationships' => array(
'og_membership_from_group_and_user' => array(
'title' => t('OG membership from a group node and user'),
Expand Down
27 changes: 0 additions & 27 deletions plugins/access/og_is_node_group.inc

This file was deleted.

27 changes: 0 additions & 27 deletions plugins/access/og_is_node_group_content.inc

This file was deleted.

60 changes: 0 additions & 60 deletions plugins/access/og_member.inc

This file was deleted.

63 changes: 0 additions & 63 deletions plugins/access/og_perm.inc

This file was deleted.

0 comments on commit 04f8258

Please sign in to comment.