mirror of
https://github.com/grafana/grafana.git
synced 2024-11-30 04:34:23 -06:00
Disable sign out button in case of auth proxy enabled
This commit is contained in:
parent
9e2ef543ed
commit
5cf3425b93
@ -111,6 +111,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>
|
||||
|
Loading…
Reference in New Issue
Block a user