Skip to content

Commit

Permalink
Changes to get new features work for impersonate app
Browse files Browse the repository at this point in the history
Signed-off-by: Sujith H <sharidasan@owncloud.com>
  • Loading branch information
sharidas committed Apr 12, 2017
1 parent 0505659 commit b474d4c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 7 additions & 1 deletion core/templates/layout.user.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,13 @@
</li>
<?php endforeach; ?>
<li>
<a id="logout" <?php print_unescaped(OC_User::getLogoutAttribute()); ?>>
<a id="logout" <?php
if(\OC::$server->getAppConfig()->getValue('impersonate', 'enabled', '') !== '') {
p($l->t('href="#"'));
} else {
print_unescaped(OC_User::getLogoutAttribute());
}
?>>
<img alt="" src="<?php print_unescaped(image_path('', 'actions/logout.svg')); ?>">
<?php p($l->t('Log out'));?>
</a>
Expand Down
2 changes: 2 additions & 0 deletions lib/private/TemplateLayout.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ public function __construct( $renderAs, $appId = '' ) {
// yes - should be injected ....
$this->config = \OC::$server->getConfig();

\OC::$server->getEventDispatcher()->dispatch('OC\TemplateLayout::loadAdditionalScripts');

// Decide which page we show
if($renderAs == 'user') {
parent::__construct( 'core', 'layout.user' );
Expand Down

0 comments on commit b474d4c

Please sign in to comment.