Move role related views to FAB Auth manager:

- List roles
- Edit role
- Create role
- View role
"""Create perm-vm if not exist and insert into FAB security model for all-dags."""
        
        for resource_name in self.DAG_RESOURCES:
            for action_name in self.DAG_ACTIONS:
                self._merge_perm(action_name, resource_name)
    def check_authorization(
        self,
        perms: Sequence[tuple[str, str]] | None = None,
        dag_id: str | None = None,
    ) -> bool:
        """Checks that the logged in user has the specified permissions."""
        if not perms:
            return True
        for perm in perms:
            if perm in (
                (permissions.ACTION_CAN_READ, permissions.RESOURCE_DAG),
                (permissions.ACTION_CAN_EDIT, permissions.RESOURCE_DAG),
                (permissions.ACTION_CAN_DELETE, permissions.RESOURCE_DAG),
            ):
                can_access_all_dags = self.has_access(*perm)
                if can_access_all_dags:
                    continue
                action = perm[0]
                if self.can_access_some_dags(action, dag_id):
                    continue
                return False
            elif not self.has_access(*perm):
                return False
        return True
class FakeAppBuilder: