doandzhiFt opened a new issue #11852:
URL: https://github.com/apache/airflow/issues/11852


   
   
   **Apache Airflow version**: 1.10.12
   
   
   **Kubernetes version (if you are using kubernetes)** (use `kubectl 
version`): Client Version: version.Info{Major:"1", Minor:"14", 
GitVersion:"v1.14.7", GitCommit:"8fca2ec50a6133511b771a11559e24191b1aa2b4", 
GitTreeState:"clean", BuildDate:"2019-09-18T14:47:22Z", GoVersion:"go1.12.9", 
Compiler:"gc", Platform:"darwin/amd64"}
   Server Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.6", 
GitCommit:"96fac5cd13a5dc064f7d9f4f23030a6aeface6cc", GitTreeState:"clean", 
BuildDate:"2019-08-19T11:05:16Z", GoVersion:"go1.12.9", Compiler:"gc", 
Platform:"linux/amd64"}
   
   **What happened**:
   
   I have defined a custom role that enables dag level access as described here 
https://airflow.readthedocs.io/en/latest/security/access-control.html. When I 
have the dag serialization disabled it is working as expected. I noticed that 
the role permissions are extended with "can dag edit" and "can dag view" in the 
UI. On the other hand when Dag serialization is enabled as described in 
http://airflow.apache.org/docs/stable/dag-serialization.html I noticed that I 
cannot see the expected dags nor the role permissions are extended with the 
mentioned 2 permissions for each dag. I noticed that this problem occured when 
I migrated to 1.10.12 from 1.10.10.  I tried running sync_perm command from the 
airflow_web container and the airflow scheduler container as well.
   
   **What you expected to happen**:
   To have sync_perm work when dag serialization is enabled. 
   <!-- What do you think went wrong? -->
   The dag level permissions are not mapped to the role correctly.
   **How to reproduce it**:
   <!---
   1. Create a simple role in the UI.
   2. Create a simple dag and pass it the role id as described here 
https://airflow.readthedocs.io/en/latest/security/access-control.html.
   3. Assign your user only this role and notice that you don't see the dag.
   4. Turn off dag serialization and restart airflow and the dag is visible in 
the UI as expected.
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to