cancel
Showing results for 
Search instead for 
Did you mean: 

Folder's Permission by user only?

chuawenching
Champ on-the-rise
Champ on-the-rise
Hi everyone,

I like to check.

I have 1 site called Payslips where all my employees will access.

They are all consumers, except the hr manager is the manager.

I like to create a folder for each of my individual staff.

But I only want each folder only to be accessed by individual staff.

e.g. folder John can be accessed by John only. This applies to folder Rebecca to be access only by Rebecca.

I can't seem to find a way to do this. Please help!

Thank you.
16 REPLIES 16

jpotts
World-Class Innovator
World-Class Innovator
This is out-of-the-box, standard permission setting functionality. Assuming you are using Alfresco Share, sometimes it is confusing when you look at Manage Permissions while in a Share site because it uses the Share role mappings. Instead, go into the "Repository" view within Alfresco Share and navigate to the folders you want to set permissions on, then manage permissions on those folders. You should see that you can (1) turn off inheritance, so that the "john" folder doesn't inherit the permissions of its parent and (2) invite "john" individually as a collaborator (or a consumer or whatever).

Manage permissions:
[img]http://i.imgur.com/Fv9wG.png[/img]

Turn off inheritance and invite user:
[img]http://i.imgur.com/ZNriQ.png[/img]

Set the permissions for the individual user:
[img]http://i.imgur.com/jMa5h.png[/img]

Jeff

chuawenching
Champ on-the-rise
Champ on-the-rise
Thanks so much Smiley Happy it works Smiley Happy

monkeydl
Champ in-the-making
Champ in-the-making
Hi Jeff,

Is there anyway that I can navigate to the manage-permissions page from within the document library of a site?

Because I've hidden the Repository link for non admin user… I don't want anybody to access the repository browser. But the Manage permission in the document library shows a different dialog, not the manage-permissions page that I want

I 've been looking through all the scripts but no hope so far

Thanks,
Hung

jpotts
World-Class Innovator
World-Class Innovator
I suppose you could add your own UI action that would link to the manage-permissions page and pass in the noderef of the object you are currently sitting on. The manage-permissions page includes a breadcrumb trail and that breadcrumb trail includes a link to the Repository so if you don't want that to show up, you might have to override the manage-permissions page to remove the breadcrumb component.

Jeff

monkeydl
Champ in-the-making
Champ in-the-making
Thanks Jeff,

I managed to replace the <action id="document-manage-site-permissions" /> and navigate it to manage-permissions page


          <action id="document-manage-site-permissions" type="pagelink" icon="document-manage-permissions" label="actions.document.manage-permissions">
            <param name="page">manage-permissions?nodeRef={node.nodeRef}</param>
            <permissions>
               <permission allow="true">ChangePermissions</permission>
            </permissions>
            <evaluator>evaluator.doclib.action.siteBased</evaluator>
         </action>

I wonder if this is the right way of doing it?

Cheers,
Hung

supta
Champ in-the-making
Champ in-the-making
I have implemented Jeff's tutorial above on files. The custom permissions is working fine but everytime the files is clicked, it's displayed with an error as following:
An error has occured in the Share component: /share/service/components/document-details/document-permissions.
It responded with a status of 500 - Internal Error.
Error Code Information: 500 - An error inside the HTTP server which prevented it from fulfilling the request.
Error Message: 04080013 Failed to execute script 'classpath*:alfresco/site-webscripts/org/alfresco/components/document-details/document-permissions.get.js': 04080012 TypeError: Cannot read property "length" from undefined (file:/opt/alfresco-4.0.b/tomcat/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/document-details/document-permissions.get.js#1476)
Server: Alfresco Spring WebScripts - v1.0.0 (Release Candidate 2 915) schema 1,000
Time: May 8, 2012 2:16:57 PM
Click here to view full technical information on the error.
The file itself is displayed under those error. How can I fix this?

jpotts
World-Class Innovator
World-Class Innovator
supta,

This thread is about managing permissions. You seem to be asking about something different. If you are asking about managing permissions, please explain what the problem is that you are seeing. Otherwise, please start a new topic.

Jeff

supta
Champ in-the-making
Champ in-the-making
Hi Jeff,

Yes, I have problem in managing permissions. I follow your instructions above but instead on a folder I applied it on a file. Click Manage permissions on a file, turn off its inheritance, invite a user and set the permissions individually. That worked fine, no error was found.

However when the invited user access the file via Document Library, there's an error:
[img]http://i44.servimg.com/u/f44/11/34/41/51/screen11.png[/img]

But if the file is accessed via Repository > Sites > SiteName > documentLibrary > folder > theFile, those error was not occured.

I hope my explanation's clear enough. Thank you.

jpotts
World-Class Innovator
World-Class Innovator
What permissions did you grant to the user who is seeing this error?

Jeff