mirror of
https://github.com/valitydev/redash.git
synced 2024-11-07 01:25:16 +00:00
Add feature flag for the permissions control feature
This commit is contained in:
parent
2592959550
commit
52b87efb73
@ -13,6 +13,7 @@
|
|||||||
$scope.refreshEnabled = false;
|
$scope.refreshEnabled = false;
|
||||||
$scope.isFullscreen = false;
|
$scope.isFullscreen = false;
|
||||||
$scope.refreshRate = 60;
|
$scope.refreshRate = 60;
|
||||||
|
$scope.showPermissionsControl = clientConfig.showPermissionsControl;
|
||||||
|
|
||||||
var renderDashboard = function (dashboard) {
|
var renderDashboard = function (dashboard) {
|
||||||
$scope.$parent.pageTitle = dashboard.name;
|
$scope.$parent.pageTitle = dashboard.name;
|
||||||
|
@ -66,6 +66,7 @@
|
|||||||
|
|
||||||
$scope.dataSource = {};
|
$scope.dataSource = {};
|
||||||
$scope.query = $route.current.locals.query;
|
$scope.query = $route.current.locals.query;
|
||||||
|
$scope.showPermissionsControl = clientConfig.showPermissionsControl;
|
||||||
|
|
||||||
var updateSchema = function() {
|
var updateSchema = function() {
|
||||||
$scope.hasSchema = false;
|
$scope.hasSchema = false;
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
<ul class="dropdown-menu pull-right" dropdown-menu>
|
<ul class="dropdown-menu pull-right" dropdown-menu>
|
||||||
<li><a data-toggle="modal" hash-link hash="edit_dashboard_dialog">Edit Dashboard</a></li>
|
<li><a data-toggle="modal" hash-link hash="edit_dashboard_dialog">Edit Dashboard</a></li>
|
||||||
<li><a data-toggle="modal" hash-link hash="add_query_dialog">Add Widget</a></li>
|
<li><a data-toggle="modal" hash-link hash="add_query_dialog">Add Widget</a></li>
|
||||||
<li><a ng-click="showSharePermissionsModal()">Manage Permissions</a></li>
|
<li ng-if="showPermissionsControl"><a ng-click="showSharePermissionsModal()">Manage Permissions</a></li>
|
||||||
<li ng-if="!dashboard.is_archived"><a ng-click="archiveDashboard()">Archive Dashboard</a></li>
|
<li ng-if="!dashboard.is_archived"><a ng-click="archiveDashboard()">Archive Dashboard</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -125,7 +125,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<ul class="dropdown-menu pull-right" dropdown-menu>
|
<ul class="dropdown-menu pull-right" dropdown-menu>
|
||||||
<li ng-if="!query.is_archived && query.id != undefined && (isQueryOwner || currentUser.hasPermission('admin'))"><a hash-link hash="archive-confirmation-modal" data-toggle="modal">Archive Query</a></li>
|
<li ng-if="!query.is_archived && query.id != undefined && (isQueryOwner || currentUser.hasPermission('admin'))"><a hash-link hash="archive-confirmation-modal" data-toggle="modal">Archive Query</a></li>
|
||||||
<li ng-if="!query.is_archived && query.id != undefined && (isQueryOwner || currentUser.hasPermission('admin'))"><a ng-click="showSharePermissionsModal()">Manage Permissions</a></li>
|
<li ng-if="!query.is_archived && query.id != undefined && (isQueryOwner || currentUser.hasPermission('admin')) && showPermissionsControl"><a ng-click="showSharePermissionsModal()">Manage Permissions</a></li>
|
||||||
<li ng-if="query.id != undefined"><a ng-click="showApiKey()">Show API Key</a></li>
|
<li ng-if="query.id != undefined"><a ng-click="showApiKey()">Show API Key</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -209,6 +209,7 @@ FEATURE_ALLOW_ALL_TO_EDIT_QUERIES = parse_boolean(os.environ.get("REDASH_FEATURE
|
|||||||
VERSION_CHECK = parse_boolean(os.environ.get("REDASH_VERSION_CHECK", "true"))
|
VERSION_CHECK = parse_boolean(os.environ.get("REDASH_VERSION_CHECK", "true"))
|
||||||
FEATURE_DISABLE_REFRESH_QUERIES = parse_boolean(os.environ.get("REDASH_FEATURE_DISABLE_REFRESH_QUERIES", "false"))
|
FEATURE_DISABLE_REFRESH_QUERIES = parse_boolean(os.environ.get("REDASH_FEATURE_DISABLE_REFRESH_QUERIES", "false"))
|
||||||
FEATURE_SHOW_QUERY_RESULTS_COUNT = parse_boolean(os.environ.get("REDASH_FEATURE_SHOW_QUERY_RESULTS_COUNT", "true"))
|
FEATURE_SHOW_QUERY_RESULTS_COUNT = parse_boolean(os.environ.get("REDASH_FEATURE_SHOW_QUERY_RESULTS_COUNT", "true"))
|
||||||
|
FEATURE_SHOW_PERMISSIONS_CONTROL = parse_boolean(os.environ.get("REDASH_FEATURE_SHOW_PERMISSIONS_CONTROL", "false"))
|
||||||
|
|
||||||
# BigQuery
|
# BigQuery
|
||||||
BIGQUERY_HTTP_TIMEOUT = int(os.environ.get("REDASH_BIGQUERY_HTTP_TIMEOUT", "600"))
|
BIGQUERY_HTTP_TIMEOUT = int(os.environ.get("REDASH_BIGQUERY_HTTP_TIMEOUT", "600"))
|
||||||
@ -223,6 +224,7 @@ ALLOW_PARAMETERS_IN_EMBEDS = parse_boolean(os.environ.get("REDASH_ALLOW_PARAMETE
|
|||||||
### Common Client config
|
### Common Client config
|
||||||
COMMON_CLIENT_CONFIG = {
|
COMMON_CLIENT_CONFIG = {
|
||||||
'allowScriptsInUserInput': ALLOW_SCRIPTS_IN_USER_INPUT,
|
'allowScriptsInUserInput': ALLOW_SCRIPTS_IN_USER_INPUT,
|
||||||
|
'showPermissionsControl': FEATURE_SHOW_PERMISSIONS_CONTROL,
|
||||||
'dateFormat': DATE_FORMAT,
|
'dateFormat': DATE_FORMAT,
|
||||||
'dateTimeFormat': "{0} HH:mm".format(DATE_FORMAT),
|
'dateTimeFormat': "{0} HH:mm".format(DATE_FORMAT),
|
||||||
'allowAllToEditQueries': FEATURE_ALLOW_ALL_TO_EDIT_QUERIES,
|
'allowAllToEditQueries': FEATURE_ALLOW_ALL_TO_EDIT_QUERIES,
|
||||||
|
Loading…
Reference in New Issue
Block a user