e3fb518ab2
- Remove workspace_id from Pydantic models in project_management routes - Remove workspace_id from SQLAlchemy and SQLite project management repos - Remove workspace_id from worker tasks (storage keys, entity creation) - Remove workspace_id from video dedup and title usage modules - Remove workspace_id from generation and ingest worker tasks - Clean workspace_id from all test files and scripts - Remove workspace-specific test files (list_workspaces, workspace repos) Task: #14 workspace_id 残留清理
51 lines
1.2 KiB
Python
51 lines
1.2 KiB
Python
"""
|
|
Permissions module - stub implementation.
|
|
Workspace concept has been removed. All permission checks pass by default.
|
|
"""
|
|
|
|
|
|
class PermissionChecker:
|
|
"""Stub permission checker - all checks pass since workspace is removed."""
|
|
|
|
def __init__(self, member_repository=None):
|
|
self.member_repository = member_repository
|
|
|
|
def check_access(self, project_id, user_id):
|
|
return True, "owner"
|
|
|
|
def check_is_owner(self, project_id, user_id):
|
|
return True
|
|
|
|
def check_is_admin_or_owner(self, project_id, user_id):
|
|
return True
|
|
|
|
def check_can_manage_members(self, project_id, user_id):
|
|
return True
|
|
|
|
def check_can_edit_project(self, project_id, user_id):
|
|
return True
|
|
|
|
def check_can_delete_project(self, project_id, user_id):
|
|
return True
|
|
|
|
def check_can_view_project(self, project_id, user_id):
|
|
return True
|
|
|
|
|
|
class Permission:
|
|
PROJECT_VIEW = "project:view"
|
|
PROJECT_CREATE = "project:create"
|
|
PROJECT_EDIT = "project:edit"
|
|
PROJECT_DELETE = "project:delete"
|
|
ASSET_VIEW = "asset:view"
|
|
ASSET_UPLOAD = "asset:upload"
|
|
ASSET_EDIT = "asset:edit"
|
|
ASSET_DELETE = "asset:delete"
|
|
|
|
|
|
ROLE_PERMISSIONS = {}
|
|
|
|
|
|
def has_permission(role, permission):
|
|
return True
|