Forums

Home » Liferay Portal » English » 2. Using Liferay » General

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Ryan Ward
Permissions with Document Library
March 4, 2010 8:47 AM
Answer

Ryan Ward

Rank: New Member

Posts: 18

Join Date: February 12, 2010

Recent Posts

I have have a document library with 2 roles assigned to it, Page-Admin and Page-User. The admin role has the right to create folders inside the library and the user is restricted to view. All folders created and even their subfolders give full rights to both roles. All documents that were added only give permissions to the Owner.

The goal is to have page/portlet admins who add documents and users that can view, but not modify the folders an documents below. Is this the normal behavior for permissions in Liferay? Is the only solution to go and double check permissions on each item after it has been added?
Shagul Khajamohideen
RE: Permissions with Document Library
March 4, 2010 1:25 PM
Answer

Shagul Khajamohideen

Rank: Liferay Master

Posts: 759

Join Date: September 27, 2007

Recent Posts

Hey Ryan,

You may want to add more details to your issue by answering the following questions.

What type of roles are you creating (regular, community etc)?
Where is the document library located? (user page, community, org etc).
How did you define permissions? (portal wide/portlet etc).
Which version of Liferay are you using?

Best Regards,
Shagul
Ryan Ward
RE: Permissions with Document Library
March 5, 2010 7:34 AM
Answer

Ryan Ward

Rank: New Member

Posts: 18

Join Date: February 12, 2010

Recent Posts

These are regular roles. The document library is on a community page. These properties are defined on the portlet. Using version 5.2.

I'm relatively new to Liferay so I'm trying to figure everything out, but right now a user with assigned to the role which will allow him/her to add documents to the library has to then go in after the file is uploaded and adjust the permissions instead of it inheriting the permissions of the folder. Liferay isn't Windows, so I was just wondering if this is normal behavior.
Shagul Khajamohideen
RE: Permissions with Document Library
March 5, 2010 8:55 AM
Answer

Shagul Khajamohideen

Rank: Liferay Master

Posts: 759

Join Date: September 27, 2007

Recent Posts

This has been reported in the below ticket.

http://issues.liferay.com/browse/LPS-5302
Andreas Netter
RE: Permissions with Document Library
October 14, 2010 8:32 AM
Answer

Andreas Netter

Rank: Junior Member

Posts: 32

Join Date: May 18, 2006

Recent Posts

The issue has the status "resolved".
However, the inheritance of permissions in document library is not working for us with Liferay 6 CE GA3. Reading the issue comments it seems that we are not the only users with this problem.

Are there special configuration options to enable permission inheritance beside permissions.user.check.algorithm=6 (which is the default property in GA3 anyway)?

Thanks and regards,
Andi
Dhrutika Vyas
RE: Permissions with Document Library
October 19, 2010 10:49 PM
Answer

Dhrutika Vyas

Rank: Expert

Posts: 438

Join Date: February 9, 2009

Recent Posts

Ryan Ward:
These are regular roles. The document library is on a community page. These properties are defined on the portlet. Using version 5.2.

I'm relatively new to Liferay so I'm trying to figure everything out, but right now a user with assigned to the role which will allow him/her to add documents to the library has to then go in after the file is uploaded and adjust the permissions instead of it inheriting the permissions of the folder. Liferay isn't Windows, so I was just wondering if this is normal behavior.


Hi Ryan,

For document library permission inheritance,you can add following property in portal-ext.properties.
permissions.view.dynamic.inheritance=true

Regards,
Dhrutika Parekh

Cignex Technologies.
Andreas Netter
RE: Permissions with Document Library
October 20, 2010 4:34 AM
Answer

Andreas Netter

Rank: Junior Member

Posts: 32

Join Date: May 18, 2006

Recent Posts

Dhrutika Parekh:
For document library permission inheritance,you can add following property in portal-ext.properties.
permissions.view.dynamic.inheritance=true


In 6 GA 3 the property is set to true per default (portal.properties). Should be unnecessary to override it in portal-ext.properties.
In 5.2.3 there is no such property in portal.properties.

What Liferay version did you mean Dhrutika?

Regards,
Andi
Dhrutika Vyas
RE: Permissions with Document Library
October 20, 2010 8:42 PM
Answer

Dhrutika Vyas

Rank: Expert

Posts: 438

Join Date: February 9, 2009

Recent Posts

Hi,

I am using 5.2 EESP3.But if property is already set then you need not to overwrite this property in portal-ext.properties.


Regards,
Dhrutika
Andreas Netter
RE: Permissions with Document Library
October 21, 2010 1:24 AM
Answer

Andreas Netter

Rank: Junior Member

Posts: 32

Join Date: May 18, 2006

Recent Posts

Hi Dhrutika,

thanks for your information.

Right, there is no need to override for 6 GA3.
Therefore the property cannot be the cause of the inheritance problem.

Regards,
Andi
James Stuart Milne
RE: Permissions with Document Library
November 29, 2010 1:40 PM
Answer

James Stuart Milne

Rank: New Member

Posts: 11

Join Date: February 23, 2010

Recent Posts

Hope this helps, I wrote this hook for document library liferay 6 the goal was to inherit permissions from parent folder in files and sub folders. it works with web-dav too.
if you have any questions regarding this. contact me jsm@eoconsulting.com.ar

This way any subfolders you create have a proper set of permissions applied to it
Attachments: docLibraryHook-hook.zip (61.2k)
Christophe Cariou
RE: Permissions with Document Library
February 18, 2011 4:05 AM
Answer

Christophe Cariou

Rank: Junior Member

Posts: 47

Join Date: October 1, 2007

Recent Posts

Hi,
Your hook shouldn't work with permission algorythme 6.

In this case, I think you have to use :
1ResourcePermissionLocalServiceUtil.getResourcePermissions()

instead of
1RoleLocalServiceUtil.getResourceRoles()


Look at p.152-153 of "Liferay portal 6 Enterprise Intranets"

Anyway, the way you do it seem right.

regards
Christophe Cariou
RE: Permissions with Document Library
May 2, 2011 5:52 AM
Answer

Christophe Cariou

Rank: Junior Member

Posts: 47

Join Date: October 1, 2007

Recent Posts

Hi,

one more thing :

In LP 6.0.6, permission algorythm (6) checks the permissions by looking up the parents permissions. So, there is no need to duplicate the permissions when you create a new element.

But, this hook is still usefull for the "view" permission, as this one is not checked against the parent. So when you want to define for a node a view permission for a role, the hook can duplicate this permission on any new children.

Another case when this Hook is useful, is when you want to break the permissions inheritance at a middel level of you tree, preserving your defined permissions on the parents and children of the node where you checked off the permission.
Adolfo Escolano
RE: Permissions with Document Library
May 29, 2011 4:52 AM
Answer

Adolfo Escolano

Rank: Junior Member

Posts: 27

Join Date: January 31, 2011

Recent Posts

Andreas Netter:
The issue has the status "resolved".
However, the inheritance of permissions in document library is not working for us with Liferay 6 CE GA3. Reading the issue comments it seems that we are not the only users with this problem.

Are there special configuration options to enable permission inheritance beside permissions.user.check.algorithm=6 (which is the default property in GA3 anyway)?

Thanks and regards,
Andi


Hello,
I am becoming crazy. I am using Liferay 6.0.6 and I would like to inherit permision from folders to files, but I can´t get success.

I have define a folder with files and I set permision only to a folder and the permision does not propagate to theirs files and I am not able to see the files.

The file does not have any permision.

by the default my configuration permision in Liferay is:
permissions.checker = com.liferay.portal.security.permission.AdvancedPermissionChecker
permissions.list.filter = com.liferay.portal.security.permission.PermissionsListFilterImpl
permissions.object.blocking.cache = false
permissions.thread.local.cache.max.size = 100
permissions.user.check.algorithm = 6
permissions.view.dynamic.inheritance = true

Any ideas?
Thanks
M. Garcia
RE: Permissions with Document Library
June 22, 2011 7:48 AM
Answer

M. Garcia

Rank: Regular Member

Posts: 107

Join Date: May 17, 2011

Recent Posts

Adolfo Escolano:
Andreas Netter:
The issue has the status "resolved".
However, the inheritance of permissions in document library is not working for us with Liferay 6 CE GA3. Reading the issue comments it seems that we are not the only users with this problem.

Are there special configuration options to enable permission inheritance beside permissions.user.check.algorithm=6 (which is the default property in GA3 anyway)?

Thanks and regards,
Andi


Hello,
I am becoming crazy. I am using Liferay 6.0.6 and I would like to inherit permision from folders to files, but I can´t get success.

I have define a folder with files and I set permision only to a folder and the permision does not propagate to theirs files and I am not able to see the files.

The file does not have any permision.

by the default my configuration permision in Liferay is:
permissions.checker = com.liferay.portal.security.permission.AdvancedPermissionChecker
permissions.list.filter = com.liferay.portal.security.permission.PermissionsListFilterImpl
permissions.object.blocking.cache = false
permissions.thread.local.cache.max.size = 100
permissions.user.check.algorithm = 6
permissions.view.dynamic.inheritance = true

Any ideas?
Thanks


Hello,

I just went through experiencing permissions inheritance in the document library.

Although permissions are not copied from the parent folder to subfolder or file, the inheritance does work.

For example, if you add a new file to a restricted folder :
  • permissions to the file will look as standard, not inherited,
  • but when a user tries to access the file which appears he has the right to, the inheritance system will block access to the file, because parent folder do not allow access.

It seems to me as it's Unix-like right management.
Someone correct me if I'm wrong, but this is what I came to believe after experiencing.

Hope you didn't go too far in crazyness ;-)
Ram A
RE: Permissions with Document Library
February 8, 2013 4:26 AM
Answer

Ram A

Rank: Junior Member

Posts: 76

Join Date: January 16, 2013

Recent Posts

Dhrutika Vyas:
Ryan Ward:
These are regular roles. The document library is on a community page. These properties are defined on the portlet. Using version 5.2.

I'm relatively new to Liferay so I'm trying to figure everything out, but right now a user with assigned to the role which will allow him/her to add documents to the library has to then go in after the file is uploaded and adjust the permissions instead of it inheriting the permissions of the folder. Liferay isn't Windows, so I was just wondering if this is normal behavior.


Hi Ryan,

For document library permission inheritance,you can add following property in portal-ext.properties.
permissions.view.dynamic.inheritance=true

Regards,
Dhrutika Parekh

Cignex Technologies.



Hi Dhrutika,
I am using liferay 6.0.6.
I have the similar issue .I have to provide a access to one folder only in Document Library to a pertcular user group.for this i created a user group and assigned a role for this group.And then i defined the permissions to this role to access Document Library from Control Panel .

Now the user can see the document library in Control Panel and he is able to see the required folder and he can access it also.

But when a sub folder or document is created in that folder the permissions are not inheriting to the newly created one from that parent folder.

Can we achieve this by using the property permissions.view.dynamic.inheritance=true ?
Please help me.


Thanks in advance
Ram A
Daniel Oswaldo Lopez Tassara
RE: Permissions with Document Library
December 10, 2013 2:25 PM
Answer

Daniel Oswaldo Lopez Tassara

Rank: New Member

Posts: 3

Join Date: May 21, 2013

Recent Posts

Hello everybody.

I have a problem related with the first message in this thread. I think that the subject of the thread changed over the time.

I have the same problem that Ryan Ward:

"I have have a document library with 2 roles assigned to it, Page-Admin and Page-User. The admin role has the right to create folders inside the library and the user is restricted to view. All folders created and even their subfolders give full rights to both roles. All documents that were added only give permissions to the Owner."

I don't know what happened, I don't know if I'm doing something wrong, but I can't get that the role A has only view permissions, and another role B has read and write permissions over a specific folder. When I give permissions to role A to view and access to a folder in Document Library, this role can add documents, change documents, and everything.

Someone have a solution to this? Is this normal?