Linux polon 4.19.0-27-amd64 #1 SMP Debian 4.19.316-1 (2024-06-25) x86_64
Apache/2.4.59 (Debian)
: 10.2.73.233 | : 18.191.144.15
Cant Read [ /etc/named.conf ]
5.6.40-64+0~20230107.71+debian10~1.gbp673146
www-data
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
home /
baltic /
web /
modules /
views /
tests /
[ HOME SHELL ]
Name
Size
Permission
Action
comment
[ DIR ]
drwxr-xr-x
field
[ DIR ]
drwxr-xr-x
handlers
[ DIR ]
drwxr-xr-x
node
[ DIR ]
drwxr-xr-x
plugins
[ DIR ]
drwxr-xr-x
styles
[ DIR ]
drwxr-xr-x
taxonomy
[ DIR ]
drwxr-xr-x
templates
[ DIR ]
drwxr-xr-x
test_handlers
[ DIR ]
drwxr-xr-x
test_plugins
[ DIR ]
drwxr-xr-x
user
[ DIR ]
drwxr-xr-x
views_access.test
9.88
KB
-rw-r--r--
views_analyze.test
1.29
KB
-rw-r--r--
views_argument_default.test
5.33
KB
-rw-r--r--
views_argument_validator.test
4.41
KB
-rw-r--r--
views_basic.test
4.45
KB
-rw-r--r--
views_cache.test
9.45
KB
-rw-r--r--
views_cache.test.css
100
B
-rw-r--r--
views_cache.test.js
100
B
-rw-r--r--
views_exposed_form.test
7.75
KB
-rw-r--r--
views_glossary.test
1.4
KB
-rw-r--r--
views_groupby.test
14.15
KB
-rw-r--r--
views_handlers.test
5.61
KB
-rw-r--r--
views_module.test
9.18
KB
-rw-r--r--
views_pager.test
19.12
KB
-rw-r--r--
views_plugin_localization_test...
893
B
-rw-r--r--
views_query.test
12.12
KB
-rw-r--r--
views_test.info
263
B
-rw-r--r--
views_test.install
219
B
-rw-r--r--
views_test.module
3.03
KB
-rw-r--r--
views_test.views_default.inc
10.5
KB
-rw-r--r--
views_translatable.test
10.01
KB
-rw-r--r--
views_ui.test
38.55
KB
-rw-r--r--
views_upgrade.test
12.64
KB
-rw-r--r--
views_view.test
13.51
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : views_access.test
<?php /** * @file * Definition of ViewsAccessTest. */ /** * Basic test for pluggable access. */ class ViewsAccessTest extends ViewsSqlTest { public static function getInfo() { return array( 'name' => 'Access', 'description' => 'Tests pluggable access for views.', 'group' => 'Views Plugins' ); } public function setUp() { parent::setUp(); $this->admin_user = $this->drupalCreateUser(array('access all views')); $this->web_user = $this->drupalCreateUser(); $this->web_role = current($this->web_user->roles); $this->normal_role = $this->drupalCreateRole(array()); $this->normal_user = $this->drupalCreateUser(array('views_test test permission')); $this->normal_user->roles[$this->normal_role] = $this->normal_role; // Reset the plugin data. views_fetch_plugin_data(NULL, NULL, TRUE); } function viewsPlugins() { $plugins = array( 'access' => array( 'test_static' => array( 'title' => t('Static test access plugin'), 'help' => t('Provides a static test access plugin.'), 'handler' => 'views_test_plugin_access_test_static', 'path' => drupal_get_path('module', 'views_test') . '/test_plugins', ), 'test_dynamic' => array( 'title' => t('Dynamic test access plugin'), 'help' => t('Provides a dynamic test access plugin.'), 'handler' => 'views_test_plugin_access_test_dynamic', 'path' => drupal_get_path('module', 'views_test') . '/test_plugins', ), ), ); return $plugins; } /** * Tests none access plugin. */ function testAccessNone() { $view = $this->view_access_none(); $view->set_display('default'); $this->assertTrue($view->display_handler->access($this->admin_user), t('Admin-Account should be able to access the view everytime')); $this->assertTrue($view->display_handler->access($this->web_user)); $this->assertTrue($view->display_handler->access($this->normal_user)); } /** * Tests perm access plugin. */ function testAccessPerm() { $view = $this->view_access_perm(); $view->set_display('default'); $access_plugin = $view->display_handler->get_plugin('access'); $this->assertTrue($view->display_handler->access($this->admin_user), t('Admin-Account should be able to access the view everytime')); $this->assertFalse($view->display_handler->access($this->web_user)); $this->assertTrue($view->display_handler->access($this->normal_user)); } /** * Tests role access plugin. */ function testAccessRole() { $view = $this->view_access_role(); $view->set_display('default'); $access_plugin = $view->display_handler->get_plugin('access'); $this->assertTrue($view->display_handler->access($this->admin_user), t('Admin-Account should be able to access the view everytime')); $this->assertFalse($view->display_handler->access($this->web_user)); $this->assertTrue($view->display_handler->access($this->normal_user)); } /** * @todo Test abstract access plugin. */ /** * Tests static access check. */ function testStaticAccessPlugin() { $view = $this->view_access_static(); $view->set_display('default'); $access_plugin = $view->display_handler->get_plugin('access'); $this->assertFalse($access_plugin->access($this->normal_user)); $access_plugin->options['access'] = TRUE; $this->assertTrue($access_plugin->access($this->normal_user)); // FALSE comes from hook_menu caching. $expected_hook_menu = array( 'views_test_test_static_access_callback', array(FALSE) ); $hook_menu = $view->execute_hook_menu('page_1'); $this->assertEqual($expected_hook_menu, $hook_menu['test_access_static']['access arguments'][0]); $expected_hook_menu = array( 'views_test_test_static_access_callback', array(TRUE) ); $this->assertTrue(views_access($expected_hook_menu)); } /** * Tests dynamic access plugin. */ function testDynamicAccessPlugin() { $view = $this->view_access_dynamic(); $argument1 = $this->randomName(); $argument2 = $this->randomName(); variable_set('test_dynamic_access_argument1', $argument1); variable_set('test_dynamic_access_argument2', $argument2); $view->set_display('default'); $access_plugin = $view->display_handler->get_plugin('access'); $this->assertFalse($access_plugin->access($this->normal_user)); $access_plugin->options['access'] = TRUE; $this->assertFalse($access_plugin->access($this->normal_user)); $view->set_arguments(array($argument1, $argument2)); $this->assertTrue($access_plugin->access($this->normal_user)); // FALSE comes from hook_menu caching. $expected_hook_menu = array( 'views_test_test_dynamic_access_callback', array(FALSE, 1, 2) ); $hook_menu = $view->execute_hook_menu('page_1'); $this->assertEqual($expected_hook_menu, $hook_menu['test_access_dynamic']['access arguments'][0]); $expected_hook_menu = array( 'views_test_test_dynamic_access_callback', array(TRUE, 1, 2) ); $this->assertTrue(views_access($expected_hook_menu, $argument1, $argument2)); } function view_access_none() { $view = new view; $view->name = 'test_access_none'; $view->description = ''; $view->tag = ''; $view->view_php = ''; $view->base_table = 'node'; $view->is_cacheable = FALSE; $view->api_version = 2; $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ /* Display: Master */ $handler = $view->new_display('default', 'Master', 'default'); $handler->display->display_options['access']['type'] = 'none'; $handler->display->display_options['cache']['type'] = 'none'; $handler->display->display_options['exposed_form']['type'] = 'basic'; $handler->display->display_options['pager']['type'] = 'full'; $handler->display->display_options['style_plugin'] = 'default'; $handler->display->display_options['row_plugin'] = 'fields'; return $view; } function view_access_perm() { $view = new view; $view->name = 'test_access_perm'; $view->description = ''; $view->tag = ''; $view->view_php = ''; $view->base_table = 'node'; $view->is_cacheable = FALSE; $view->api_version = 2; $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ /* Display: Master */ $handler = $view->new_display('default', 'Master', 'default'); $handler->display->display_options['access']['type'] = 'perm'; $handler->display->display_options['access']['perm'] = 'views_test test permission'; $handler->display->display_options['cache']['type'] = 'none'; $handler->display->display_options['exposed_form']['type'] = 'basic'; $handler->display->display_options['pager']['type'] = 'full'; $handler->display->display_options['style_plugin'] = 'default'; $handler->display->display_options['row_plugin'] = 'fields'; return $view; } function view_access_role() { $view = new view; $view->name = 'test_access_role'; $view->description = ''; $view->tag = ''; $view->view_php = ''; $view->base_table = 'node'; $view->is_cacheable = FALSE; $view->api_version = 2; $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ /* Display: Master */ $handler = $view->new_display('default', 'Master', 'default'); $handler->display->display_options['access']['type'] = 'role'; $handler->display->display_options['access']['role'] = array( $this->normal_role => $this->normal_role, ); $handler->display->display_options['cache']['type'] = 'none'; $handler->display->display_options['exposed_form']['type'] = 'basic'; $handler->display->display_options['pager']['type'] = 'full'; $handler->display->display_options['style_plugin'] = 'default'; $handler->display->display_options['row_plugin'] = 'fields'; return $view; } function view_access_dynamic() { $view = new view; $view->name = 'test_access_dynamic'; $view->description = ''; $view->tag = ''; $view->view_php = ''; $view->base_table = 'node'; $view->is_cacheable = FALSE; $view->api_version = 2; $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ /* Display: Master */ $handler = $view->new_display('default', 'Master', 'default'); $handler->display->display_options['access']['type'] = 'test_dynamic'; $handler->display->display_options['cache']['type'] = 'none'; $handler->display->display_options['exposed_form']['type'] = 'basic'; $handler->display->display_options['pager']['type'] = 'full'; $handler->display->display_options['style_plugin'] = 'default'; $handler->display->display_options['row_plugin'] = 'fields'; $handler = $view->new_display('page', 'Page', 'page_1'); $handler->display->display_options['path'] = 'test_access_dynamic'; return $view; } function view_access_static() { $view = new view; $view->name = 'test_access_static'; $view->description = ''; $view->tag = ''; $view->view_php = ''; $view->base_table = 'node'; $view->is_cacheable = FALSE; $view->api_version = 2; $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ /* Display: Master */ $handler = $view->new_display('default', 'Master', 'default'); $handler->display->display_options['access']['type'] = 'test_static'; $handler->display->display_options['cache']['type'] = 'none'; $handler->display->display_options['exposed_form']['type'] = 'basic'; $handler->display->display_options['pager']['type'] = 'full'; $handler->display->display_options['style_plugin'] = 'default'; $handler->display->display_options['row_plugin'] = 'fields'; $handler = $view->new_display('page', 'Page', 'page_1'); $handler->display->display_options['path'] = 'test_access_static'; return $view; } }
Close