Skip to content

Commit

Permalink
fix perms in dagit (#7115)
Browse files Browse the repository at this point in the history
* fix perms in dagit

* add changes
  • Loading branch information
prha committed Mar 17, 2022
1 parent 0c72a16 commit 1c7f030
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

# 0.14.5
### Bugfixes

- [dagit] Fixed issue where sensors could not be turned on/off in dagit.

# 0.14.4
### New

Expand Down
7 changes: 3 additions & 4 deletions js_modules/dagit/packages/core/src/app/Permissions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ export type PermissionsFromJSON = {
launch_pipeline_reexecution?: boolean;
start_schedule?: boolean;
stop_running_schedule?: boolean;
start_sensor?: boolean;
stop_sensor?: boolean;
edit_sensor?: boolean;
terminate_pipeline_execution?: boolean;
delete_pipeline_run?: boolean;
reload_repository_location?: boolean;
Expand All @@ -31,8 +30,8 @@ const extractPermissions = (permissions: PermissionFragment[]) => {
canLaunchPipelineReexecution: !!permsMap.launch_pipeline_reexecution,
canStartSchedule: !!permsMap.start_schedule,
canStopRunningSchedule: !!permsMap.stop_running_schedule,
canStartSensor: !!permsMap.start_sensor,
canStopSensor: !!permsMap.stop_sensor,
canStartSensor: !!permsMap.edit_sensor,
canStopSensor: !!permsMap.edit_sensor,
canTerminatePipelineExecution: !!permsMap.terminate_pipeline_execution,
canDeletePipelineRun: !!permsMap.delete_pipeline_run,
canReloadRepositoryLocation: !!permsMap.reload_repository_location,
Expand Down
3 changes: 1 addition & 2 deletions js_modules/dagit/packages/core/src/testing/TestProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ export const PERMISSIONS_ALLOW_ALL: PermissionsFromJSON = {
launch_pipeline_reexecution: true,
start_schedule: true,
stop_running_schedule: true,
start_sensor: true,
stop_sensor: true,
edit_sensor: true,
terminate_pipeline_execution: true,
delete_pipeline_run: true,
reload_repository_location: true,
Expand Down

1 comment on commit 1c7f030

@vercel
Copy link

@vercel vercel bot commented on 1c7f030 Mar 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.