mirror of
https://github.com/valitydev/redash.git
synced 2024-11-08 09:53:59 +00:00
Allow collaborators to update query schedule.
This commit is contained in:
parent
47fc6612bf
commit
6b56e4a3e3
@ -16,7 +16,6 @@ function QuerySourceCtrl(Events, toastr, $controller, $scope, $location, $http,
|
|||||||
const saveQuery = $scope.saveQuery;
|
const saveQuery = $scope.saveQuery;
|
||||||
|
|
||||||
$scope.sourceMode = true;
|
$scope.sourceMode = true;
|
||||||
$scope.canEdit = currentUser.canEdit($scope.query) || $scope.query.can_edit;
|
|
||||||
$scope.isDirty = false;
|
$scope.isDirty = false;
|
||||||
$scope.base_url = `${$location.protocol()}://${$location.host()}:${$location.port()}`;
|
$scope.base_url = `${$location.protocol()}://${$location.host()}:${$location.port()}`;
|
||||||
|
|
||||||
|
@ -135,6 +135,7 @@ function QueryViewCtrl($scope, Events, $route, $routeParams, $location, $window,
|
|||||||
$scope.queryExecuting = false;
|
$scope.queryExecuting = false;
|
||||||
|
|
||||||
$scope.isQueryOwner = (currentUser.id === $scope.query.user.id) || currentUser.hasPermission('admin');
|
$scope.isQueryOwner = (currentUser.id === $scope.query.user.id) || currentUser.hasPermission('admin');
|
||||||
|
$scope.canEdit = currentUser.canEdit($scope.query) || $scope.query.can_edit;
|
||||||
$scope.canViewSource = currentUser.hasPermission('view_source');
|
$scope.canViewSource = currentUser.hasPermission('view_source');
|
||||||
|
|
||||||
$scope.canExecuteQuery = () => currentUser.hasPermission('execute_query') && !$scope.dataSource.view_only;
|
$scope.canExecuteQuery = () => currentUser.hasPermission('execute_query') && !$scope.dataSource.view_only;
|
||||||
@ -333,7 +334,7 @@ function QueryViewCtrl($scope, Events, $route, $routeParams, $location, $window,
|
|||||||
}
|
}
|
||||||
|
|
||||||
$scope.openScheduleForm = () => {
|
$scope.openScheduleForm = () => {
|
||||||
if (!$scope.isQueryOwner || !$scope.canScheduleQuery) {
|
if (!$scope.canEdit || !$scope.canScheduleQuery) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user