Alla Sapozhnikova 2 Months Ago - Edited Hello, what portal property should be used to allaow permission propagation? Please sign in to reply. Reply as... Cancel Vitaliy Koshelenko Alla Sapozhnikova 2 Months Ago - Edited Hello! This one: permissions.propagation.enabled=true Please sign in to reply. Reply as... Cancel Alla Sapozhnikova Vitaliy Koshelenko 2 Months Ago - Edited Thank you sp much for your reply. in portal.properties thsi is how this property is described: # # Set the following to true to enable propagation of permissions between # models. # # For example, when setting the permissions on a specific Wiki node, if # you assign a role a permission (e.g. DELETE), then the assignment of that # permission is also propagated to all Wiki pages that belong to that Wiki # node. # # The actual logic of how permissions are propagated among models is # specified per portlet. See liferay-portlet.xml's use of the element # "permission-propagator". I looked at my Liferay 7.4 installation and I did not find the "permission-propagator" element anywhere. So, I am still unsure as to how I can enable the propagartion dor, say, document library. Please sign in to reply. Reply as... Cancel Vitaliy Koshelenko Alla Sapozhnikova 2 Months Ago - Edited Did you read the blog content? Or only title? :) There is an example for Document Library, you can check it out. Property description text is obsolete, and is based on Liferay 6.2 version, where all portlet configuration was defined in XML descriptors (e.g. liferay-portlet.xml). For 7.x version OSGi configuration is used instead: you need to implement an OSGi component for PermissionPropagator service and associate it with the portlet you need, like in example here for DL: "javax.portlet.name=" + DLPortletKeys.DOCUMENT_LIBRARY Please sign in to reply. Reply as... Cancel Alla Sapozhnikova Vitaliy Koshelenko 2 Months Ago - Edited Thank you for your response; it has cleared up my confusion. Please sign in to reply. Reply as... Cancel
Vitaliy Koshelenko Alla Sapozhnikova 2 Months Ago - Edited Hello! This one: permissions.propagation.enabled=true Please sign in to reply. Reply as... Cancel Alla Sapozhnikova Vitaliy Koshelenko 2 Months Ago - Edited Thank you sp much for your reply. in portal.properties thsi is how this property is described: # # Set the following to true to enable propagation of permissions between # models. # # For example, when setting the permissions on a specific Wiki node, if # you assign a role a permission (e.g. DELETE), then the assignment of that # permission is also propagated to all Wiki pages that belong to that Wiki # node. # # The actual logic of how permissions are propagated among models is # specified per portlet. See liferay-portlet.xml's use of the element # "permission-propagator". I looked at my Liferay 7.4 installation and I did not find the "permission-propagator" element anywhere. So, I am still unsure as to how I can enable the propagartion dor, say, document library. Please sign in to reply. Reply as... Cancel Vitaliy Koshelenko Alla Sapozhnikova 2 Months Ago - Edited Did you read the blog content? Or only title? :) There is an example for Document Library, you can check it out. Property description text is obsolete, and is based on Liferay 6.2 version, where all portlet configuration was defined in XML descriptors (e.g. liferay-portlet.xml). For 7.x version OSGi configuration is used instead: you need to implement an OSGi component for PermissionPropagator service and associate it with the portlet you need, like in example here for DL: "javax.portlet.name=" + DLPortletKeys.DOCUMENT_LIBRARY Please sign in to reply. Reply as... Cancel Alla Sapozhnikova Vitaliy Koshelenko 2 Months Ago - Edited Thank you for your response; it has cleared up my confusion. Please sign in to reply. Reply as... Cancel
Alla Sapozhnikova Vitaliy Koshelenko 2 Months Ago - Edited Thank you sp much for your reply. in portal.properties thsi is how this property is described: # # Set the following to true to enable propagation of permissions between # models. # # For example, when setting the permissions on a specific Wiki node, if # you assign a role a permission (e.g. DELETE), then the assignment of that # permission is also propagated to all Wiki pages that belong to that Wiki # node. # # The actual logic of how permissions are propagated among models is # specified per portlet. See liferay-portlet.xml's use of the element # "permission-propagator". I looked at my Liferay 7.4 installation and I did not find the "permission-propagator" element anywhere. So, I am still unsure as to how I can enable the propagartion dor, say, document library. Please sign in to reply. Reply as... Cancel Vitaliy Koshelenko Alla Sapozhnikova 2 Months Ago - Edited Did you read the blog content? Or only title? :) There is an example for Document Library, you can check it out. Property description text is obsolete, and is based on Liferay 6.2 version, where all portlet configuration was defined in XML descriptors (e.g. liferay-portlet.xml). For 7.x version OSGi configuration is used instead: you need to implement an OSGi component for PermissionPropagator service and associate it with the portlet you need, like in example here for DL: "javax.portlet.name=" + DLPortletKeys.DOCUMENT_LIBRARY Please sign in to reply. Reply as... Cancel Alla Sapozhnikova Vitaliy Koshelenko 2 Months Ago - Edited Thank you for your response; it has cleared up my confusion. Please sign in to reply. Reply as... Cancel
Vitaliy Koshelenko Alla Sapozhnikova 2 Months Ago - Edited Did you read the blog content? Or only title? :) There is an example for Document Library, you can check it out. Property description text is obsolete, and is based on Liferay 6.2 version, where all portlet configuration was defined in XML descriptors (e.g. liferay-portlet.xml). For 7.x version OSGi configuration is used instead: you need to implement an OSGi component for PermissionPropagator service and associate it with the portlet you need, like in example here for DL: "javax.portlet.name=" + DLPortletKeys.DOCUMENT_LIBRARY Please sign in to reply. Reply as... Cancel Alla Sapozhnikova Vitaliy Koshelenko 2 Months Ago - Edited Thank you for your response; it has cleared up my confusion. Please sign in to reply. Reply as... Cancel
Alla Sapozhnikova Vitaliy Koshelenko 2 Months Ago - Edited Thank you for your response; it has cleared up my confusion. Please sign in to reply. Reply as... Cancel
Jonas Wanner 2 Months Ago - Edited Vitaliy, thanks for the great blog post! It highlights a solution I wasn't aware of, and it seems directly applicable to a few challenges we've been facing. Please sign in to reply. Reply as... Cancel
Ivano Carrara 24 Days Ago - Edited Hello Vitalik, thank you for your interesting post. Unfortunately it seems to me that it doesn't provide the desired result. After deploying the module, I update a folder with permissions assigned to a specific role and in the log I correctly see the messages "[DLPermissionPropagatorImpl:73] Propagated permissions from DLFolder #488 ....". But when I go to this new folder the documents holds the original permissions. Moreover if I create a new sub-folder or I upload a new file in the folder the UI propose me the classical Permissions option (Anyone (Guest role) Site Members, Owner). Again if I update the permissions of the new folder in the log I correctly see the messages "[DLPermissionPropagatorImpl:73] Propagated permissions from DLFolder #488 ...." but when I upload new documents I get the same the classic Permission choices propose. I added some more options in portal-ext.propeties but with no luck: permissions.check.guest.enabled=true permissions.view.dynamic.inheritance=true permissions.propagation.enabled=true Please could you help us more? Thank you in advance! Please sign in to reply. Reply as... Cancel Vitaliy Koshelenko Ivano Carrara 24 Days Ago - Edited Hi Ivano, Unfortunately - yes, it does not work dynamically for newly added folders/files. The goal of Permissions Propagator is to make sure when you assign permssions to a parent entity - they're propagated automatically to child ones (that already exist). Permissions Propagator is invoked when you define permissons in permissions configuration window, and is not aware of any entities created afterwards. For "dynamic" permissions based on parent entity - probably, you'll need other extension points, e.g. model listeners on DL Folders. Ragards, Vitaliy Please sign in to reply. Reply as... Cancel Ivano Carrara Vitaliy Koshelenko 23 Days Ago - Edited Hi Vitaliy, thank you for your feedback. I'm sorry to contradict you but the permissions are not propagated even for documents already present in the folder. I created a folder and uploaded a document. Then I change the folder permissions and in the log I see the message "[DLPermissionPropagatorImpl:73] Propagated permissions from DLFolder #48827 'Folder for Teachers' to DLFileEntry #48829 '100 use cases ... .pdf'" If I look at the permissions of the document these are only the same by default as its original creation. If you tell me where to do it I can send you screen shots and other documentation. Regards, Ivano Please sign in to reply. Reply as... Cancel
Vitaliy Koshelenko Ivano Carrara 24 Days Ago - Edited Hi Ivano, Unfortunately - yes, it does not work dynamically for newly added folders/files. The goal of Permissions Propagator is to make sure when you assign permssions to a parent entity - they're propagated automatically to child ones (that already exist). Permissions Propagator is invoked when you define permissons in permissions configuration window, and is not aware of any entities created afterwards. For "dynamic" permissions based on parent entity - probably, you'll need other extension points, e.g. model listeners on DL Folders. Ragards, Vitaliy Please sign in to reply. Reply as... Cancel Ivano Carrara Vitaliy Koshelenko 23 Days Ago - Edited Hi Vitaliy, thank you for your feedback. I'm sorry to contradict you but the permissions are not propagated even for documents already present in the folder. I created a folder and uploaded a document. Then I change the folder permissions and in the log I see the message "[DLPermissionPropagatorImpl:73] Propagated permissions from DLFolder #48827 'Folder for Teachers' to DLFileEntry #48829 '100 use cases ... .pdf'" If I look at the permissions of the document these are only the same by default as its original creation. If you tell me where to do it I can send you screen shots and other documentation. Regards, Ivano Please sign in to reply. Reply as... Cancel
Ivano Carrara Vitaliy Koshelenko 23 Days Ago - Edited Hi Vitaliy, thank you for your feedback. I'm sorry to contradict you but the permissions are not propagated even for documents already present in the folder. I created a folder and uploaded a document. Then I change the folder permissions and in the log I see the message "[DLPermissionPropagatorImpl:73] Propagated permissions from DLFolder #48827 'Folder for Teachers' to DLFileEntry #48829 '100 use cases ... .pdf'" If I look at the permissions of the document these are only the same by default as its original creation. If you tell me where to do it I can send you screen shots and other documentation. Regards, Ivano Please sign in to reply. Reply as... Cancel