jedcunningham commented on a change in pull request #15385:
URL: https://github.com/apache/airflow/pull/15385#discussion_r681159977



##########
File path: airflow/www/views.py
##########
@@ -3271,6 +3271,58 @@ def list(self):
         )
 
 
+class ProvidersView(AirflowBaseView):

Review comment:
       ```suggestion
   class ProviderView(AirflowBaseView):
   ```
   
   I think this should be singular.

##########
File path: airflow/www/extensions/init_views.py
##########
@@ -91,6 +91,9 @@ def init_appbuilder_views(app):
     appbuilder.add_view(
         views.PluginView, permissions.RESOURCE_PLUGIN, 
category=permissions.RESOURCE_ADMIN_MENU
     )
+    appbuilder.add_view(
+        views.ProvidersView, permissions.RESOURCE_PROVIDER, 
category=permissions.RESOURCE_ADMIN_MENU

Review comment:
       ```suggestion
           views.ProviderView, permissions.RESOURCE_PROVIDER, 
category=permissions.RESOURCE_ADMIN_MENU
   ```

##########
File path: airflow/www/views.py
##########
@@ -3271,6 +3271,58 @@ def list(self):
         )
 
 
+class ProvidersView(AirflowBaseView):
+    """View to show Airflow Providers"""
+
+    default_view = 'list'
+
+    class_permission_name = permissions.RESOURCE_PROVIDER
+
+    method_permission_name = {
+        'list': 'read',
+    }
+
+    base_permissions = [
+        permissions.ACTION_CAN_READ,
+        permissions.ACTION_CAN_ACCESS_MENU,
+    ]
+
+    @expose('/providers')

Review comment:
       ```suggestion
       @expose('/provider')
   ```




-- 
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.

To unsubscribe, e-mail: [email protected]

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


Reply via email to