airflow.providers.fab.www.security_manager¶
Attributes¶
Classes¶
Minimal security manager needed to run a Flask application. |
Module Contents¶
- class airflow.providers.fab.www.security_manager.AirflowSecurityManagerV2(appbuilder)[source]¶
Bases:
airflow.utils.log.logging_mixin.LoggingMixin
Minimal security manager needed to run a Flask application.
This one is used to run the Flask application needed to run Airflow 2 plugins unless Fab auth manager is configured in the environment. In that case,
FabAirflowSecurityManagerOverride
is used.- has_access(action_name, resource_name, user=None, resource_pk=None)[source]¶
Verify whether a given user could perform a certain action on the given resource.
Example actions might include can_read, can_write, can_delete, etc.
This function is called by FAB when accessing a view. See https://github.com/dpgaspar/Flask-AppBuilder/blob/c6fecdc551629e15467fde5d06b4437379d90592/flask_appbuilder/security/decorators.py#L134
- Parameters:
- Returns:
Whether user could perform certain action on the resource.
- Return type: