refactor(auth): delegate access control to be-system
Remove Agent Desk users, roles, login sessions, tokens, and local permission persistence. Expose the backend as an embeddable ai-agent module with host-provided subject lookup and operation authorization callbacks, and complete the frontend/backend repository split.
This commit is contained in:
@@ -1,96 +0,0 @@
|
||||
package request
|
||||
|
||||
import "agent-desk/internal/pkg/enums"
|
||||
|
||||
type RevokeSessionRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
}
|
||||
|
||||
type RevokeUserSessionsRequest struct {
|
||||
UserID int64 `json:"userId"`
|
||||
}
|
||||
|
||||
type CreateUserRequest struct {
|
||||
Username string `json:"username"`
|
||||
Nickname string `json:"nickname"`
|
||||
Avatar string `json:"avatar"`
|
||||
Mobile *string `json:"mobile"`
|
||||
Email *string `json:"email"`
|
||||
Remark string `json:"remark"`
|
||||
RoleIDs []int64 `json:"roleIds"`
|
||||
}
|
||||
|
||||
type UpdateUserRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
Nickname string `json:"nickname"`
|
||||
Avatar string `json:"avatar"`
|
||||
Mobile *string `json:"mobile"`
|
||||
Email *string `json:"email"`
|
||||
Remark string `json:"remark"`
|
||||
}
|
||||
|
||||
type DeleteUserRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
}
|
||||
|
||||
type UpdateUserStatusRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
Status int `json:"status"`
|
||||
}
|
||||
|
||||
type ChangePasswordRequest struct {
|
||||
Password string `json:"password"`
|
||||
}
|
||||
|
||||
type AssignRoleRequest struct {
|
||||
UserID int64 `json:"userId"`
|
||||
RoleIDs []int64 `json:"roleIds"`
|
||||
}
|
||||
|
||||
type CreateRoleRequest struct {
|
||||
Name string `json:"name"`
|
||||
Code string `json:"code"`
|
||||
Remark string `json:"remark"`
|
||||
}
|
||||
|
||||
type UpdateRoleRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
SortNo int `json:"sortNo"`
|
||||
Remark string `json:"remark"`
|
||||
}
|
||||
|
||||
type DeleteRoleRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
}
|
||||
|
||||
type UpdateRoleStatusRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
Status enums.Status `json:"status"`
|
||||
}
|
||||
|
||||
type AssignPermissionRequest struct {
|
||||
RoleID int64 `json:"roleId"`
|
||||
PermissionIDs []int64 `json:"permissionIds"`
|
||||
}
|
||||
|
||||
type CreateConversationTagRequest struct {
|
||||
Name string `json:"name"`
|
||||
Color string `json:"color"`
|
||||
Status int `json:"status"`
|
||||
SortNo int `json:"sortNo"`
|
||||
Remark string `json:"remark"`
|
||||
}
|
||||
|
||||
type UpdateConversationTagRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Color string `json:"color"`
|
||||
Status int `json:"status"`
|
||||
SortNo int `json:"sortNo"`
|
||||
Remark string `json:"remark"`
|
||||
}
|
||||
|
||||
type DeleteConversationTagRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
package request
|
||||
|
||||
import "agent-desk/internal/pkg/enums"
|
||||
import "code.tczkiot.com/wlw/ai-agent/internal/pkg/enums"
|
||||
|
||||
type CreateAgentProfileRequest struct {
|
||||
UserID int64 `json:"userId"`
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package request
|
||||
|
||||
import "agent-desk/internal/pkg/enums"
|
||||
import "code.tczkiot.com/wlw/ai-agent/internal/pkg/enums"
|
||||
|
||||
type SaveAgentRunQualityFeedbackRequest struct {
|
||||
AgentRunID int64 `json:"agentRunId"`
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package request
|
||||
|
||||
import "agent-desk/internal/pkg/enums"
|
||||
import "code.tczkiot.com/wlw/ai-agent/internal/pkg/enums"
|
||||
|
||||
type AIAgentMCPToolRequest struct {
|
||||
ToolCode string `json:"toolCode"`
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package request
|
||||
|
||||
import "agent-desk/internal/ai/workflow/dsl"
|
||||
import "code.tczkiot.com/wlw/ai-agent/internal/ai/workflow/dsl"
|
||||
|
||||
type CreateAIWorkflowRequest struct {
|
||||
Name string `json:"name"`
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
package request
|
||||
|
||||
type LoginRequest struct {
|
||||
Username string `json:"username"`
|
||||
Password string `json:"password"`
|
||||
}
|
||||
|
||||
type WxWorkExchangeRequest struct {
|
||||
Ticket string `json:"ticket"`
|
||||
}
|
||||
|
||||
type OIDCExchangeRequest struct {
|
||||
Ticket string `json:"ticket"`
|
||||
}
|
||||
@@ -28,10 +28,6 @@ type DeleteChannelRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
}
|
||||
|
||||
type ResetChannelUserTokenSecretRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
}
|
||||
|
||||
type ChannelMessageOutboxActionRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ package request
|
||||
import (
|
||||
"io"
|
||||
|
||||
"agent-desk/internal/pkg/enums"
|
||||
"code.tczkiot.com/wlw/ai-agent/internal/pkg/enums"
|
||||
)
|
||||
|
||||
type CreateKnowledgeBaseRequest struct {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package request
|
||||
|
||||
import "agent-desk/internal/pkg/enums"
|
||||
import "code.tczkiot.com/wlw/ai-agent/internal/pkg/enums"
|
||||
|
||||
type MessageListRequest struct {
|
||||
ConversationID int64 `json:"conversationId"`
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package request
|
||||
|
||||
import "agent-desk/internal/pkg/enums"
|
||||
import "code.tczkiot.com/wlw/ai-agent/internal/pkg/enums"
|
||||
|
||||
type QuickReplyListRequest struct {
|
||||
GroupName string `json:"groupName"`
|
||||
|
||||
Reference in New Issue
Block a user