Commit 548ee47a by Carl Bergquist

Merge pull request #3122 from shoonoise/hide_signout

Disable sign out button in case of auth proxy enabled
parents 55448de9 5cf3425b
......@@ -114,6 +114,7 @@ func getFrontendSettingsMap(c *middleware.Context) (map[string]interface{}, erro
"datasources": datasources,
"appSubUrl": setting.AppSubUrl,
"allowOrgCreate": (setting.AllowUserOrgCreate && c.IsSignedIn) || c.IsGrafanaAdmin,
"authProxyEnabled": setting.AuthProxyEnabled,
"buildInfo": map[string]interface{}{
"version": setting.BuildVersion,
"commit": setting.BuildCommit,
......
......@@ -120,6 +120,7 @@ function (angular, _, $, coreModule, config) {
};
$scope.init = function() {
$scope.showSignup = contextSrv.isSignedIn && !config['authProxyEnabled'];
$scope.updateMenu();
$scope.$on('$routeChangeSuccess', $scope.updateMenu);
};
......
......@@ -60,8 +60,7 @@
<span class="sidemenu-item-text">Grafana admin</span>
</a>
</li>
<li ng-if="contextSrv.isSignedIn">
<li ng-if="showSignup">
<a href="logout" class="sidemenu-item" target="_self">
<span class="icon-circle sidemenu-icon"><i class="fa fa-fw fa-sign-out"></i></span>
<span class="sidemenu-item-text">Sign out</span>
......@@ -83,7 +82,7 @@
<span class="sidemenu-item-text">Exit admin</span>
</a>
</li>
<li>
<li ng-if="showSignup">
<a href="logout" class="sidemenu-item" target="_self">
<span class="icon-circle sidemenu-icon"><i class="fa fa-fw fa-sign-out"></i></span>
<span class="sidemenu-item-text">Sign out</span>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment