10-13-2020 06:06 PM
Hello everyone,
Im using Alfresco Community version 6.0.a (Dockerized). I have deployed Alfresco in a production eviornment and my client has come up with a specific requirement. Their requirement is to restricit user to Leave Site, once the user has been added.
Kindly refer me a possible solution for this requirement.
The problem is quite urgent so please help me as soon as possible.
10-13-2020 10:57 PM
You have to extend, share-header.get.js and you can use the below code.
if (!user.isAdmin) { widgetUtils.deleteObjectFromArray(model.jsonModel, "id", "HEADER_LEAVE_SITE"); }
10-13-2020 10:57 PM
You have to extend, share-header.get.js and you can use the below code.
if (!user.isAdmin) { widgetUtils.deleteObjectFromArray(model.jsonModel, "id", "HEADER_LEAVE_SITE"); }
10-14-2020 01:40 AM
Dear Sanjay,
Thanks for providing the solution in such an urgent situation. This works like a charm!
Regards,
Syed Junaid Hussain.
10-14-2020 01:53 AM
Dear Sanjay,
Can you please tell me that if it is possible to restrict Manager of the site to edit other users comments?
Will be very grateful to your help.
10-14-2020 02:11 AM
Manager having all the permission and it is required.
What is the use case for not allowing manager to edit comment?
This api is used to get all comment.
GET /alfresco/s/api/node/{store_type}/{store_id}/{id}/comments?reverse={reverse?}&startIndex={startIndex?}&pageSize={pageSize?}
You can make modification in this api for permission.
This api returning json response from that one key called permission is there.
"permissions": {"edit": true, "delete": true}
Base on this it is displaying Edit/Delete Button.
10-28-2020 07:33 AM
Dear Sanjay,
Our client is using Rule Based Workflows, so when the approver approves the document, he comments on the document first like "approved" and then the document is moved to another folder where another approver has to approve according to that documents approval flow.
We are using comments so that a high authority specific user can have a treck on who approved the document.
Now the approvers in the workflow are the users who have manager permissions. So our client's concern is that even Managers shoudn't be able to edit or delete other user's comments.
I want to do the changes on application level. I tried to edit comment-list.js in "webapps/share/components/comments" and but none of the changes took place. I even tried to alert a message in comment-list.js file (to check if any edition in the file is working or not) but nothing happened.
Can you please suggest me what file should I change in Share.
The solution you suggested is fine but my senior told me to do changes on application level.
Any suggestion regarding this matter will be very helpful to me.
Regards,
Syed Junaid
Explore our Alfresco products with the links below. Use labels to filter content by product module.