You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Sriram1404 (via GitHub)" <gi...@apache.org> on 2025/06/19 05:07:12 UTC

Re: [D] Is it possible to override the global permission for the User role at dag level ? [airflow]

GitHub user Sriram1404 edited a discussion: Is it possible to override the global permission for the User role at dag level ?

Hi Community, 
     My use case is  dag should be trigger only by the airflow admin role users but the issue is user role has edit access to all the dags. I cannot remove the can edit on DAGs from the User role. Tried adding the access_control attribute in DAG constructor like below,

with DAG(
    dag_id='test_dag',
    description='test dag',
    schedule_interval=None,
    catchup=False,
    start_date=days_ago(1),
    max_active_runs=1,
    max_active_tasks=CONFIG_LIST.get("max_active_tasks", 16),
    default_args=default_args,
    tags=["restricted"],
    access_control={
        'Admin': {'can_read', 'can_edit', 'can_trigger'},
        'User': {'can_read'}
    }
) as dag
Still people in User role can do all the operation. 

Please let me know how to restrict the User role permission at dag level? Only people in the Admin role allowed to do all operation in this dag, other user role only allowed to read. 
Thanks in advance. 

GitHub link: https://github.com/apache/airflow/discussions/51914

----
This is an automatically sent email for commits@airflow.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@airflow.apache.org