Make pause DAG its own role separate from edit DAG#30581
Make pause DAG its own role separate from edit DAG#30581herlambang wants to merge 14 commits intoapache:mainfrom
Conversation
8ad2e53 to
51ff98b
Compare
|
What is edit dag role used for if not pause? |
|
To trigger Dag Run, combine with dag_run can_create |
|
I think it looks good in principle, but if I understand it correctly, it is heavily breaking change and it should have support to migrate existing permission that will work in general case. If I understand it - someone who currently has "CAN_EDIT" role will suddenly not be able to pause dags. In other words people who could pause dags, will suddenly loose this capability without a warning? If so, then this is a breaking change and we need to make sure that backwards compatibility is maintained. At the minimum level every role that currently has CAN_EDIT role should have CAN_PAUSE assigned during the migration. We have to remember, that our users could have their roles assigned in arbitrary way so making sure that ADMIN user has all the permissions is not enough, because our users could have different roles defined on their own. |
e49de14 to
bbb312e
Compare
|
Hi @potiuk , thanks for the feedback. (Sorry for my bad on pushing dirty commit after rebase, added several people as reviewers 🙏 ) |
|
I'd need others to take a look if that change makes sense. |
|
Anyone else wants to chime in ? (and @herlambang -> you will need ot rebase and fix the conflict). |
…in all dags access
on it! Changes added in description, probably to make it more appealing to read |
|
Anyone here who is more into permissions? @jhtimmins @ephraimbuddy maybe ? :) |
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions. |
|
@herlambang I love the work you've done so far. Looking forward to test it! |
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions. |
Add ability to pause DAGs as separate role from edit.
Use cases
Giving users ability to running DAGs without having the ability to pause it. Also to prevent users to easily/accidentally suspend DAGs.
Scopes
Changes
Pause/Unpause DAGin home page if user is not eligible for can_pause dagPause/Unpause DAGin detail dag page if user is not eligible for can_pause dagUnpause DAG when triggeredin trigger form if user is not eligible for can_pause dag/pausedfrom ACTION_CAN_EDIT to ACTION_CAN_PAUSE on main viewpatch/dags/<dag-id>and/dagsfrom ACTION_CAN_EDIT to ACTION_CAN_PAUSE on API end pointcloses: #22317
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rstor{issue_number}.significant.rst, in newsfragments.