feat: implement user authentication and permission-based data filtering

Add user login system with role-based access control:
- Admin users see all data and can filter by any manager
- Regular users only see records where ManagerName matches their username

New components:
- BIPUsersDAO: user authentication and management
- SessionManager: singleton session state management
- LoginDialog: modal login UI for app startup
- init_users.sql: initial user setup script

Permission enforcement:
- Material validation tab: hide manager filter for non-admin, force filter by current user
- Material type management: hide filter UI for non-admin, filter at database level
- Window title and status bar display current user info

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Misaka_Company
2026-02-09 18:17:31 +08:00
parent 57c23f4608
commit 04b99292ad
10 changed files with 607 additions and 22 deletions

6
auth/__init__.py Normal file
View File

@@ -0,0 +1,6 @@
"""
Auth package for user authentication and session management
"""
from .session_manager import SessionManager
__all__ = ['SessionManager']