Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in renaming an item using plone.shortname behavior #310

Open
ekulos opened this issue Jul 30, 2020 · 0 comments
Open

Error in renaming an item using plone.shortname behavior #310

ekulos opened this issue Jul 30, 2020 · 0 comments

Comments

@ekulos
Copy link

ekulos commented Jul 30, 2020

affected Plone<=5.2.x

Tring to rename an object, if the current user didn't have edit permission on the parent folder the plone.shortname behavior did not catch the exeption raised:
`Traceback (innermost last):
  Module ZPublisher.Publish, line 138, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module ZPublisher.Publish, line 48, in call_object
  Module plone.z3cform.layout, line 63, in __call__
  Module plone.z3cform.layout, line 47, in update
  Module plone.dexterity.browser.edit, line 58, in update
  Module plone.z3cform.fieldsets.extensible, line 65, in update
  Module plone.z3cform.patch, line 30, in GroupForm_update
  Module z3c.form.group, line 145, in update
  Module plone.app.z3cform.csrf, line 22, in execute
  Module z3c.form.action, line 98, in execute
  Module z3c.form.button, line 315, in __call__
  Module z3c.form.button, line 170, in __call__
  Module plone.dexterity.browser.edit, line 30, in handleApply
  Module z3c.form.group, line 116, in applyChanges
  Module z3c.form.group, line 82, in applyChanges
  Module z3c.form.form, line 51, in applyChanges
  Module z3c.form.datamanager, line 91, in set
  Module plone.app.dexterity.behaviors.id, line 59, in _set_id
  Module plone.folder.ordered, line 208, in manage_renameObject
  Module OFS.CopySupport, line 358, in manage_renameObject
  Module plone.dexterity.content, line 230, in _verifyObjectPaste
  Module Products.CMFCore.PortalFolder, line 407, in _verifyObjectPaste
  Module OFS.CopySupport, line 532, in _verifyObjectPaste
CopyError:
<HTML>
<HEAD>
<TITLE>Insufficient Privileges</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<FORM ACTION="manage_main" METHOD="GET" >
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="10">
<TR>
  <TD VALIGN="TOP">
  <BR>
  <CENTER><B><FONT SIZE="+6" COLOR="#77003B">!</FONT></B></CENTER>
  </TD>
  <TD VALIGN="TOP">
  <BR><BR>
  <CENTER>
  You do not possess the Add portal content permission in the context of the container into which you are pasting, thus you are not able to perform this operation.
  </CENTER>
  </TD>
</TR>
<TR>
  <TD VALIGN="TOP">
  </TD>
  <TD VALIGN="TOP">
  <CENTER>
  <INPUT TYPE="SUBMIT" VALUE="   Ok   ">
  </CENTER>
  </TD>
</TR>
</TABLE>
</FORM>
</BODY></HTML>`

should be raised an Unauthorized Exception and show the relative page.

To reproduce the error:
create a Plone Site
create a simple user
create an object and share the edit permission on the user added in the previous step.
loggin with the user and edit the object and try to rename it via the short name field

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants