-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add change manager #49
Conversation
This enables the Manager to track changes throughout projects. It is a very helpful feature which is generally not enabled in the ce version.
Hi, Thx PS: It would be great to get this to work :D |
True, it failes with "Sorry, there was a problem submitting your comment". the This is because I also saw that |
I had a quick look: I think one should not enable this at the moment. It does not even work in one session (or better if you enable just the TrackChanges I had following behaviour:
now if one reloads the Project you get again the field/box where you can Accept or Reject the changes. In general I think following has to be done if one wants to enable the Track Changes and Comments Feature: First one has to add all route in route.jsFor example: webRouter.get(
'/project/:project_id/threads',
AuthorizationMiddleware.blockRestrictedUserFromProject,
AuthorizationMiddleware.ensureUserCanReadProject,
ChatController.getThreads
)
webRouter.post(
'/project/:project_id/thread/:thread_id/messages',
AuthorizationMiddleware.blockRestrictedUserFromProject,
AuthorizationMiddleware.ensureUserCanReadProject,
ChatController.sendComment
)
webRouter.post(
'/project/:project_id/thread/:thread_id/resolve',
AuthorizationMiddleware.blockRestrictedUserFromProject,
AuthorizationMiddleware.ensureUserCanReadProject,
ChatController.resolveThread
) Missing routes I have seen so far: Second one has to adapt at least the ChatController.jsand add the missing code between the ChatController and the ChatApiHandler.js sendComment(req, res, next) {
const { project_id: projectId } = req.params
const { thread_id: threadId } = req.params
const { content, client_id: clientId } = req.body
const userId = SessionManager.getLoggedInUserId(req.session)
if (userId == null) {
const err = new Error('no logged-in user')
return next(err)
}
return ChatApiHandler.sendComment(
projectId,
threadId,
userId,
content,
function (err, message) {
if (err != null) {
return next(err)
}
return UserInfoManager.getPersonalInfo(
message.user_id,
function (err, user) {
if (err != null) {
return next(err)
}
message.user = UserInfoController.formatPersonalInfo(user)
message.clientId = clientId
EditorRealTimeController.emitToRoom(
projectId,
'rp-new-comment',
message
)
return res.sendStatus(204)
}
)
}
)
}, and maybe some more ConclusionIt would be really cool if someone could have a look into this - but I also think this is a bit of work (but I think it is possible because the API/backend code seems to be there |
see issue #53 |
This enables the Manager to track changes throughout projects.
It is a very helpful feature which is generally not enabled in the ce version.