@@ -32,7 +32,7 @@ class TracyDebugger extends WireData implements Module, ConfigurableModule {
3232 'summary' => __('Tracy debugger from Nette with several PW specific custom tools.', __FILE__),
3333 'author' => 'Adrian Jones',
3434 'href' => 'https://processwire.com/talk/topic/12208-tracy-debugger/',
35- 'version' => '4.9.27 ',
35+ 'version' => '4.9.28 ',
3636 'autoload' => true,
3737 'singular' => true,
3838 'requires' => 'ProcessWire>=2.7.2, PHP>=5.4.4',
@@ -211,6 +211,7 @@ class TracyDebugger extends WireData implements Module, ConfigurableModule {
211211 "debugModePanelSections" => array('pagesLoaded', 'modulesLoaded', 'hooks', 'databaseQueries', 'selectorQueries', 'timers', 'user', 'cache', 'autoload'),
212212 "diagnosticsPanelSections" => array('filesystemFolders'),
213213 "snippetsPath" => 'templates',
214+ "userSwitcherRestricted" => null,
214215 "todoIgnoreDirs" => 'git, svn, images, img, errors, sass-cache, node_modules',
215216 "todoScanModules" => null,
216217 "todoAllowedExtensions" => 'php, module, inc, txt, latte, html, htm, md, css, scss, less, js',
@@ -2712,6 +2713,23 @@ class TracyDebugger extends WireData implements Module, ConfigurableModule {
27122713 if($data['customPhpCode']) $f->attr('value', $data['customPhpCode']);
27132714 $fieldset->add($f);
27142715
2716+ // User Switcher Panel
2717+ $fieldset = $this->wire('modules')->get("InputfieldFieldset");
2718+ $fieldset->label = __('User Switcher panel', __FILE__);
2719+ $wrapper->add($fieldset);
2720+
2721+ $f = $this->wire('modules')->get("InputfieldAsmSelect");
2722+ $f->attr('name', 'userSwitcherRestricted');
2723+ $f->label = __('Restricted Roles', __FILE__);
2724+ $f->description = __('Users with selected roles will not be available from the list of users to switch to.', __FILE__);
2725+ $f->notes = __('This can be useful if you use the User system to store frontend "members" and the system has a lot of users.', __FILE__);
2726+ $f->setAsmSelectOption('sortable', false);
2727+ foreach($this->wire('roles') as $role) {
2728+ $f->addOption($role->id, $role->name);
2729+ }
2730+ if($data['userSwitcherRestricted']) $f->attr('value', $data['userSwitcherRestricted']);
2731+ $fieldset->add($f);
2732+
27152733 // Server Type Indicator
27162734 $fieldset = $this->wire('modules')->get("InputfieldFieldset");
27172735 $fieldset->label = __('Server type indicator', __FILE__);
0 commit comments