Repository navigation
Fix Mark Instance state buttons stay disabled if user lacks permission (#37451) - #38732
Merged
bbovenzi merged 1 commit intoMay 31, 2024
Merged
Conversation
RodrigoGanancia
requested review from
ashb,
bbovenzi,
pierrejeambrun and
ryanahamilton
as code owners
April 4, 2024 01:58
|
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide (https://github.com/apache/airflow/blob/main/contributing-docs/README.rst)
|
bbovenzi
reviewed
Apr 4, 2024
RodrigoGanancia
force-pushed
the
task_instance_buttons_permissions
branch
from
April 15, 2024 10:39
9ab50c6 to
4d04624
Compare
RodrigoGanancia
requested review from
Fokko,
XD-DENG,
bolkedebruin,
dstandish,
eladkal,
ephraimbuddy,
hussein-awala,
jedcunningham,
jhtimmins,
josh-fell,
kaxil,
mik-laj,
mobuchowski,
o-nikolas,
potiuk and
uranusjr
as code owners
May 10, 2024 14:37
Contributor
Author
|
Hey, the code is now ready, since the fix is pretty simple I removed the test case which was not needed. I'm sorry for the latest commit, It's my first time contributing and I messed up the rebase. I have already fixed it having now only one commit. |
uranusjr
removed request for
Fokko,
XD-DENG,
bolkedebruin,
dstandish,
eladkal,
ephraimbuddy,
hussein-awala,
jedcunningham,
jhtimmins,
josh-fell,
kaxil,
mik-laj,
mobuchowski,
o-nikolas,
potiuk and
uranusjr
May 14, 2024 04:13
bbovenzi
approved these changes
May 31, 2024
|
Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions. |
13 of 41 tasks
fdemiane
pushed a commit
to fdemiane/airflow
that referenced
this pull request
Jun 6, 2024
romsharon98
pushed a commit
to romsharon98/airflow
that referenced
this pull request
Jul 26, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes: #37451
This bug adresses a visual issue occuring when attempting to mark task states as Failed or Sucess, or when using clear button without the 'can edit on Task Instances' role. This resulted in a not expected partially empty screen in the dag menu.
The fix resolves the issue by disabling both the "Clear Task" and "Mark state as…" buttons when the user lacks permission, same as the behavior when the user can't edit on DAGs.
Now, in 'views.py', an additional meta named 'can_edit_taskintances' is passed to 'grid.html' based on the user's task instance edit permission, same as the meta 'can_edit' from user's dag edit permission defined in 'dag.html'.
Both 'canEdit' and 'canEditTaskInstances' definitions were moved inside the React components. This was necessary just for the variables to be mockable during testing, as these variables were defined before the component was loaded.