Permissions needed for Publishing in section

I found this question already asked, but not solved: https://answers.nuxeo.com/general/q/8308f961c17244919de03403bd559260/Publishing-rights-with-users-groups So I will ask it again. Given the section, which I gave an explicit permissions “Read” and “CanAskForPublishing” to a user (not to a group he is member of, to avoid groups issues), the user still can't publish to that location. According to the documentation (https://doc.nuxeo.com/userdoc/permissions/), that would be sufficient to submit a document for publishing. I must give Read/Write access to the section to let a user to publish into that section. Is the “CanAskForPublishing” right deprecated for LTS2019 and webui?

0 votes

1 answers

1074 views

ANSWER



Hello,

I've reproduced the issue, and this is a bug. I've created a JIRA ticket to solve it https://jira.nuxeo.com/browse/NXP-29120. It looks like we are not checking for the right permissions in https://github.com/nuxeo/nuxeo-web-ui/blob/10.10/elements/nuxeo-publication/nuxeo-internal-publish.html#L213. If you want to walkaround the issue:

  • Either use Edit permissions
  • Or override the element

Regards

1 votes



Hi, Gregory! Thanks for your quick answer! Let me clarify, please. Your first suggestion - do you mean to use Read/Write permission (which I did) or to edit the presets of permissions? Your second suggestion - overriding the element, I guess the problem is in the line 213: var hasPermission = this.hasPermission(this.publishSpace, 'AddChildren');. What would be the correct string (permission name) here? Is it CanAskForPublishing or anything else? Should I do any other corrections to override successfully? Thanks in advance!
05/19/2020

Hi, my first suggestion was simply to use Edit whereas it should expect Read + CanAskForPublishing. I think you will have side effects of moving addChildren property (linked to Write permission from https://explorer.nuxeo.com/nuxeo/site/distribution/server-10.10/viewExtensionPoint/org.nuxeo.ecm.core.security.SecurityService–permissions) to Read. Thinking about the way to update the current publication window, I might disable the default one, create a copy of the nuxeo-internal-publish.html element (rename it), update the line in error, then create a new button in the Document Actions slot.
05/18/2020

Hi again Gregory, maybe it's just my version of nuxeo, but there are Read, ReadWrite, Everything and CanAskFoPublishing by default, no Edit permissions (look at the permissions.jpg). And if I decide to override nuxeo-internal-publish module, how should I update the wrong line? Would changing AddChildren to CanAskForPublishing be ok?
05/19/2020