Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added permissions

  • Loading branch information...
commit 30d34fa1598a231eb499a9454639137ef4acb0be 1 parent 047c3c0
@markwk authored
View
47 atrium_opentok.features.user_permission.inc
@@ -0,0 +1,47 @@
+<?php
+
+/**
+ * Implementation of hook_user_default_permissions().
+ */
+function atrium_opentok_user_default_permissions() {
+ $permissions = array();
+
+ // Exported permission: create video_chat_og content
+ $permissions['create video_chat_og content'] = array(
+ 'name' => 'create video_chat_og content',
+ 'roles' => array(
+ '0' => 'authenticated user',
+ ),
+ );
+
+ // Exported permission: delete any video_chat_og content
+ $permissions['delete any video_chat_og content'] = array(
+ 'name' => 'delete any video_chat_og content',
+ 'roles' => array(),
+ );
+
+ // Exported permission: delete own video_chat_og content
+ $permissions['delete own video_chat_og content'] = array(
+ 'name' => 'delete own video_chat_og content',
+ 'roles' => array(),
+ );
+
+ // Exported permission: edit any video_chat_og content
+ $permissions['edit any video_chat_og content'] = array(
+ 'name' => 'edit any video_chat_og content',
+ 'roles' => array(
+ '0' => 'administrator',
+ '1' => 'manager',
+ ),
+ );
+
+ // Exported permission: edit own video_chat_og content
+ $permissions['edit own video_chat_og content'] = array(
+ 'name' => 'edit own video_chat_og content',
+ 'roles' => array(
+ '0' => 'authenticated user',
+ ),
+ );
+
+ return $permissions;
+}
View
5 atrium_opentok.info
@@ -13,6 +13,11 @@ features[context][] = "video_chat"
features[ctools][] = "context:context:3"
features[ctools][] = "strongarm:strongarm:1"
features[node][] = "video_chat_og"
+features[user_permission][] = "create video_chat_og content"
+features[user_permission][] = "delete any video_chat_og content"
+features[user_permission][] = "delete own video_chat_og content"
+features[user_permission][] = "edit any video_chat_og content"
+features[user_permission][] = "edit own video_chat_og content"
features[variable][] = "comment_anonymous_video_chat_og"
features[variable][] = "comment_controls_video_chat_og"
features[variable][] = "comment_default_mode_video_chat_og"
View
164 atrium_opentok.views_default.inc
@@ -18,6 +18,40 @@ function atrium_opentok_views_default_views() {
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->override_option('fields', array(
+ 'title' => array(
+ 'label' => 'Event',
+ 'alter' => array(
+ 'alter_text' => 0,
+ 'text' => '',
+ 'make_link' => 0,
+ 'path' => '',
+ 'link_class' => '',
+ 'alt' => '',
+ 'prefix' => '',
+ 'suffix' => '',
+ 'target' => '',
+ 'help' => '',
+ 'trim' => 0,
+ 'max_length' => '',
+ 'word_boundary' => 1,
+ 'ellipsis' => 1,
+ 'html' => 0,
+ 'strip_tags' => 0,
+ ),
+ 'empty' => '',
+ 'hide_empty' => 0,
+ 'empty_zero' => 0,
+ 'link_to_node' => 1,
+ 'spaces' => array(
+ 'frontpage' => 0,
+ 'type' => 'spaces_og',
+ ),
+ 'exclude' => 0,
+ 'id' => 'title',
+ 'table' => 'node',
+ 'field' => 'title',
+ 'relationship' => 'none',
+ ),
'field_date_value' => array(
'label' => 'Date',
'alter' => array(
@@ -62,15 +96,6 @@ function atrium_opentok_views_default_views() {
'field' => 'field_date_value',
'relationship' => 'none',
),
- 'title' => array(
- 'label' => 'Event',
- 'link_to_node' => 1,
- 'exclude' => 0,
- 'id' => 'title',
- 'table' => 'node',
- 'field' => 'title',
- 'relationship' => 'none',
- ),
));
$handler->override_option('sorts', array(
'field_date_value' => array(
@@ -141,94 +166,6 @@ function atrium_opentok_views_default_views() {
$handler->override_option('use_pager', '1');
$handler->override_option('style_plugin', 'table');
$handler = $view->new_display('page', 'Page: Video Chat Sessions', 'page_1');
- $handler->override_option('fields', array(
- 'field_date_value' => array(
- 'label' => 'Date',
- 'alter' => array(
- 'alter_text' => 0,
- 'text' => '',
- 'make_link' => 0,
- 'path' => '',
- 'link_class' => '',
- 'alt' => '',
- 'prefix' => '',
- 'suffix' => '',
- 'target' => '',
- 'help' => '',
- 'trim' => 0,
- 'max_length' => '',
- 'word_boundary' => 1,
- 'ellipsis' => 1,
- 'html' => 0,
- 'strip_tags' => 0,
- ),
- 'empty' => '',
- 'hide_empty' => 0,
- 'empty_zero' => 0,
- 'link_to_node' => 0,
- 'label_type' => 'widget',
- 'format' => 'day',
- 'multiple' => array(
- 'multiple_number' => '',
- 'multiple_from' => '',
- 'multiple_to' => '',
- 'group' => TRUE,
- ),
- 'repeat' => array(
- 'show_repeat_rule' => '',
- ),
- 'fromto' => array(
- 'fromto' => 'both',
- ),
- 'exclude' => 0,
- 'id' => 'field_date_value',
- 'table' => 'node_data_field_date',
- 'field' => 'field_date_value',
- 'relationship' => 'none',
- ),
- 'title' => array(
- 'label' => 'Event',
- 'link_to_node' => 1,
- 'exclude' => 0,
- 'id' => 'title',
- 'table' => 'node',
- 'field' => 'title',
- 'relationship' => 'none',
- ),
- 'name' => array(
- 'label' => 'Event Type',
- 'alter' => array(
- 'alter_text' => 0,
- 'text' => '',
- 'make_link' => 0,
- 'path' => '',
- 'link_class' => '',
- 'alt' => '',
- 'prefix' => '',
- 'suffix' => '',
- 'target' => '',
- 'help' => '',
- 'trim' => 0,
- 'max_length' => '',
- 'word_boundary' => 1,
- 'ellipsis' => 1,
- 'html' => 0,
- 'strip_tags' => 0,
- ),
- 'empty' => '',
- 'hide_empty' => 0,
- 'empty_zero' => 0,
- 'link_to_taxonomy' => 0,
- 'exclude' => 0,
- 'id' => 'name',
- 'table' => 'term_data',
- 'field' => 'name',
- 'override' => array(
- 'button' => 'Use default',
- ),
- 'relationship' => 'none',
- ),
- ));
$handler->override_option('filters', array(
'status' => array(
'operator' => '=',
@@ -247,8 +184,7 @@ function atrium_opentok_views_default_views() {
'type' => array(
'operator' => 'in',
'value' => array(
- 'event' => 'event',
- 'feed_ical_item' => 'feed_ical_item',
+ 'video_chat_og' => 'video_chat_og',
),
'group' => '0',
'exposed' => FALSE,
@@ -260,35 +196,9 @@ function atrium_opentok_views_default_views() {
'table' => 'node',
'field' => 'type',
'relationship' => 'none',
- ),
- 'date_filter' => array(
- 'operator' => '>=',
- 'value' => array(
- 'min' => NULL,
- 'max' => NULL,
- 'value' => NULL,
- 'default_date' => 'now',
- 'default_to_date' => '',
- ),
- 'group' => '0',
- 'exposed' => FALSE,
- 'expose' => array(
- 'operator' => FALSE,
- 'label' => '',
- ),
- 'date_fields' => array(
- 'node_data_field_date.field_date_value2' => 'node_data_field_date.field_date_value2',
+ 'override' => array(
+ 'button' => 'Use default',
),
- 'date_method' => 'OR',
- 'granularity' => 'second',
- 'form_type' => 'date_select',
- 'default_date' => 'now',
- 'default_to_date' => '',
- 'year_range' => '-3:+3',
- 'id' => 'date_filter',
- 'table' => 'node',
- 'field' => 'date_filter',
- 'relationship' => 'none',
),
'current' => array(
'operator' => 'active',
Please sign in to comment.
Something went wrong with that request. Please try again.