feat: implement user type-based UI access control
Restrict settings interface and material validation features based on user type: - SettingsTab: User type only sees "Test ERP Connection" and "Test Database Connection" buttons; Admin sees full configuration interface - MaterialValidationTab: Hide manager filter and data source options from non-admin users; default to database_filtered mode - test_db_connection(): Read from config directly to support User type without UI variables - Add backward compatibility: no session_manager defaults to full interface Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -83,8 +83,8 @@ class MainWindow:
|
||||
self.query_tab = DataQueryTab(self.notebook, self.config)
|
||||
self.notebook.add(self.query_tab, text="数据查询")
|
||||
|
||||
# 设置标签页
|
||||
self.settings_tab = SettingsTab(self.notebook, self.config)
|
||||
# 设置标签页(传入 session_manager)
|
||||
self.settings_tab = SettingsTab(self.notebook, self.config, self.session_manager)
|
||||
self.notebook.add(self.settings_tab, text="设置")
|
||||
|
||||
def create_status_bar(self):
|
||||
|
||||
Reference in New Issue
Block a user