Daily Log for #alfresco IRC Channel

Alfresco discussion and collaboration. Stick around a few hours after asking a question.

Official support for Enterprise subscribers: support.alfresco.com.

Joining the Channel:

Join in the conversation by getting an IRC client and connecting to #alfresco at Freenode. Our you can use the IRC web chat.

More information about the channel is in the wiki.

Getting Help

More help is available in this list of resources.

Daily Log for #alfresco

2019-06-06 14:35:55 GMT <alfresco-discord> <drazen04> Hi guys, i would ask you if there is a way to retrieve a role of the actual user in a java class evaluator. Example if role equals consumer return true

2019-06-06 14:35:57 GMT <alfresco-discord> <drazen04> thanks

2019-06-06 14:37:17 GMT <alfresco-discord> <yreg> Consumer is not a ROLE, it is a permission

2019-06-06 14:37:46 GMT <alfresco-discord> <yreg> and you can only get a permission with regards to a node (or a site)

2019-06-06 14:38:11 GMT <alfresco-discord> <yreg> there is definitely quite a few methods in PermissionService that would help with that

2019-06-06 14:38:56 GMT <angelborroy> If that is a Share evaluator, probably you’ll find the role in the JSON passed to the evaluator

2019-06-06 14:39:08 GMT <angelborroy> role > permission

2019-06-06 14:40:50 GMT <alfresco-discord> <drazen04> yes, sure, my fault. I was talking about permission. Yes i saw the json object coming, but there are all permissions for that node

2019-06-06 14:42:05 GMT <alfresco-discord> <drazen04> I would like to retrieve the permissions that has the current user. Because i noticed that a consumer can start a workflow and i don't want this behaviour

2019-06-06 14:43:40 GMT <angelborroy> If that is a Share Action, then you can tweak the permission by overriding the action

2019-06-06 14:44:03 GMT <angelborroy> You can include “Write” to the action permissions

2019-06-06 14:47:23 GMT <alfresco-discord> <drazen04> Can you please explain me how it works or the behaviour of this tag?

2019-06-06 14:49:51 GMT <angelborroy> I think your are looking for this action

2019-06-06 14:49:52 GMT <angelborroy> https://github.com/Alfresco/share/blob/b3dbe6debd21837e9be24cbb2e1e4ba880a0f38f/share/src/main/resources/alfresco/share-documentlibrary-config.xml#L1084

2019-06-06 14:49:53 GMT <alfbot> Title:share/share-documentlibrary-config.xml at b3dbe6debd21837e9be24cbb2e1e4ba880a0f38f · Alfresco/share · GitHub (at github.com)

2019-06-06 14:50:13 GMT <angelborroy> You can override it in share-config-custom including a permissions block

2019-06-06 14:50:14 GMT <angelborroy> <permissions>

2019-06-06 14:50:15 GMT <angelborroy> <permission allow="true">Write</permission>

2019-06-06 14:50:15 GMT <angelborroy> </permissions>

2019-06-06 14:55:14 GMT <alfresco-discord> <drazen04> Thank you, i'll try. Seems what i'm lookin for

2019-06-06 14:55:20 GMT <alfresco-discord> <drazen04> 👌

2019-06-06 15:11:39 GMT <alfresco-discord> <drazen04> It works

2019-06-06 15:12:00 GMT <angelborroy> congrats ;-)

2019-06-06 15:12:01 GMT <alfresco-discord> <drazen04> But as always doesn't work for the same action in multi-select

2019-06-06 15:12:17 GMT <angelborroy> You have the action some lines above

2019-06-06 15:12:39 GMT <angelborroy> https://github.com/Alfresco/share/blob/b3dbe6debd21837e9be24cbb2e1e4ba880a0f38f/share/src/main/resources/alfresco/share-documentlibrary-config.xml#L807

2019-06-06 15:12:40 GMT <alfbot> Title:share/share-documentlibrary-config.xml at b3dbe6debd21837e9be24cbb2e1e4ba880a0f38f · Alfresco/share · GitHub (at github.com)

2019-06-06 15:12:59 GMT <alfresco-discord> <drazen04> Yes, but i saw that in multi-select you can add only hasAspect, notAspect

2019-06-06 15:13:45 GMT <alfresco-discord> <drazen04> to allow or not some action

2019-06-06 15:13:48 GMT <angelborroy> I don’t remember if “permission” is allowed in that element

2019-06-06 15:14:19 GMT <angelborroy> Did you tried permission=“Write”?

2019-06-06 15:14:38 GMT <angelborroy> it should work

2019-06-06 15:19:41 GMT <alfresco-discord> <drazen04> No, the override of the action does not effect on same action in multi-select

2019-06-06 15:20:08 GMT <alfresco-discord> <drazen04> I found this issue every time

2019-06-06 15:20:13 GMT <angelborroy> I mean, something like

2019-06-06 15:20:21 GMT <angelborroy> <action type="action-link" id="onActionAssignWorkflow" asset="document" icon="document-assign-workflow" label="menu.selected-items.assign-workflow" permission=“Write”/>

2019-06-06 15:20:36 GMT <angelborroy> You have to override also the “multi-select” action declaration

2019-06-06 15:22:15 GMT <alfresco-discord> <drazen04> Ok, i'll try, never used permissions, i was talkin about evaluators. Thank you, Angel

2019-06-06 15:30:53 GMT <alfresco-discord> <drazen04> It works👌

2019-06-06 15:39:31 GMT <angelborroy> perfect

2019-06-06 15:58:56 GMT <alfresco-discord> <dgradecak> hi guys, anyone knows for what reason search result facating would not work correctly? I can understand if something does not work on a custom field but on cm:modifer or cm:creator for instance? on some other fields it works (dates/fily type ...)

2019-06-06 15:59:14 GMT <alfresco-discord> <dgradecak> well I did not test in solr directly but just through share

2019-06-06 16:00:38 GMT <alfresco-discord> <dgradecak> v 6.1.2 community

End of Daily Log

The other logs are at http://esplins.org/hash_alfresco