(feature)(chat)Support agent-level permission management.
Some checks failed
supersonic CentOS CI / build (21) (push) Has been cancelled
supersonic mac CI / build (21) (push) Has been cancelled
supersonic ubuntu CI / build (21) (push) Has been cancelled
supersonic windows CI / build (21) (push) Has been cancelled

This commit is contained in:
jerryjzhang
2025-02-24 09:25:12 +08:00
parent 29271f7278
commit b5aa6e046e
7 changed files with 95 additions and 11 deletions

View File

@@ -405,4 +405,9 @@ ALTER TABLE s2_chat_context RENAME COLUMN `user` TO `query_user`;
--20241226
ALTER TABLE s2_chat_memory add column `query_id` BIGINT DEFAULT NULL;
ALTER TABLE s2_query_stat_info RENAME COLUMN `sql` TO `query_sql`;
ALTER TABLE s2_query_stat_info RENAME COLUMN `sql` TO `query_sql`;
--20250224
ALTER TABLE s2_agent add column `admin_org` varchar(3000) DEFAULT NULL COMMENT '管理员组织';
ALTER TABLE s2_agent add column `view_org` varchar(3000) DEFAULT NULL COMMENT '可用组织';
ALTER TABLE s2_agent add column `is_open` tinyint DEFAULT NULL COMMENT '是否公开';

View File

@@ -377,8 +377,11 @@ CREATE TABLE IF NOT EXISTS s2_agent
updated_at TIMESTAMP null,
enable_search int null,
enable_feedback int null,
admin varchar(1000),
viewer varchar(1000),
`admin` varchar(3000) DEFAULT NULL , -- administrator
`admin_org` varchar(3000) DEFAULT NULL , -- administrators organization
`is_open` TINYINT DEFAULT NULL , -- whether the public
`viewer` varchar(3000) DEFAULT NULL , -- available users
`view_org` varchar(3000) DEFAULT NULL , -- available organization
PRIMARY KEY (`id`)
); COMMENT ON TABLE s2_agent IS 'agent information table';

View File

@@ -15,8 +15,11 @@ CREATE TABLE IF NOT EXISTS `s2_agent` (
`created_at` datetime DEFAULT NULL,
`updated_by` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
`admin` varchar(1000) COLLATE utf8_unicode_ci DEFAULT NULL,
`viewer` varchar(1000) COLLATE utf8_unicode_ci DEFAULT NULL,
`admin` varchar(3000) DEFAULT NULL COMMENT '管理员',
`admin_org` varchar(3000) DEFAULT NULL COMMENT '管理员组织',
`is_open` tinyint DEFAULT NULL COMMENT '是否公开',
`viewer` varchar(3000) DEFAULT NULL COMMENT '可用用户',
`view_org` varchar(3000) DEFAULT NULL COMMENT '可用组织',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

View File

@@ -15,8 +15,11 @@ CREATE TABLE IF NOT EXISTS s2_agent (
created_at timestamp DEFAULT NULL,
updated_by varchar(100) DEFAULT NULL,
updated_at timestamp DEFAULT NULL,
admin varchar(1000) DEFAULT NULL,
viewer varchar(1000) DEFAULT NULL
admin varchar(3000) DEFAULT NULL,
admin_org varchar(3000) DEFAULT NULL,
is_open smallint DEFAULT NULL,
viewer varchar(3000) DEFAULT NULL,
view_org varchar(3000) DEFAULT NULL
);
CREATE TABLE IF NOT EXISTS s2_auth_groups (