mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-04-25 11:18:22 +00:00
Add new application structure: - app/main.py - application entry point - app/plugins/ - plugin system with auth plugin: - api/ - REST API endpoints and schemas - authorization/ - auth policies, providers, hooks - domain/ - business logic (service, models, jwt, password) - injection/ - route injection and guards - ops/ - operational utilities - runtime/ - runtime configuration - security/ - middleware, CSRF, dependencies - storage/ - user repositories and models - app/static/ - static assets (scalar.js for API docs) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
19 lines
503 B
Python
19 lines
503 B
Python
"""Default permission provider hooks for auth-plugin authorization."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from collections.abc import Callable
|
|
|
|
from app.plugins.auth.authorization.types import ALL_PERMISSIONS
|
|
|
|
PermissionProvider = Callable[[object], list[str]]
|
|
|
|
|
|
def default_permission_provider(user: object) -> list[str]:
|
|
"""Return the current static permission set for an authenticated user."""
|
|
|
|
return list(ALL_PERMISSIONS)
|
|
|
|
|
|
__all__ = ["PermissionProvider", "default_permission_provider"]
|