Restrict user from Leaving Site.

cancel
Showing results for 
Search instead for 
Did you mean: 
Syedjunaid
Active Member II

Restrict user from Leaving Site.

Jump to solution

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.

 

1 Solution

Accepted Solutions
sanjaybandhniya
Intermediate

Re: Restrict user from Leaving Site.

Jump to solution

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");
}

 

View solution in original post

5 Replies
sanjaybandhniya
Intermediate

Re: Restrict user from Leaving Site.

Jump to solution

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");
}

 

Syedjunaid
Active Member II

Re: Restrict user from Leaving Site.

Jump to solution

Dear Sanjay,

Thanks for providing the solution in such an urgent situation. This works like a charm!

 

Regards,

Syed Junaid Hussain.

Syedjunaid
Active Member II

Re: Restrict user from Leaving Site.

Jump to solution

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.

sanjaybandhniya
Intermediate

Re: Restrict user from Leaving Site.

Jump to solution

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.

Syedjunaid
Active Member II

Re: Restrict user from Leaving Site.

Jump to solution

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