feat(server): add project sharing access control
This commit is contained in:
@@ -254,6 +254,41 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
||||
Path: "/projects/:id/nodes/:nodeId/text-extraction/async",
|
||||
Handler: extractNodeTextAsyncHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
Method: http.MethodGet,
|
||||
Path: "/projects/:id/sharing",
|
||||
Handler: getShareSettingsHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
Method: http.MethodDelete,
|
||||
Path: "/projects/:id/sharing/access",
|
||||
Handler: revokeShareAccessHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
Method: http.MethodPut,
|
||||
Path: "/projects/:id/sharing/link",
|
||||
Handler: updateShareLinkHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
Method: http.MethodPost,
|
||||
Path: "/projects/:id/sharing/members",
|
||||
Handler: inviteShareMemberHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
Method: http.MethodPatch,
|
||||
Path: "/projects/:id/sharing/members/:memberId",
|
||||
Handler: updateShareMemberHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
Method: http.MethodDelete,
|
||||
Path: "/projects/:id/sharing/members/:memberId",
|
||||
Handler: deleteShareMemberHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
Method: http.MethodGet,
|
||||
Path: "/projects/:id/sharing/visitors",
|
||||
Handler: listShareVisitorsHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
Method: http.MethodPatch,
|
||||
Path: "/projects/:id/title",
|
||||
@@ -269,6 +304,11 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
||||
Path: "/projects/batch-delete",
|
||||
Handler: deleteProjectsHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
Method: http.MethodGet,
|
||||
Path: "/shares/:shareId",
|
||||
Handler: resolveShareHandler(serverCtx),
|
||||
},
|
||||
},
|
||||
rest.WithPrefix("/api"),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user