Discussion:
[Erp5-dev] Unauthorized on document ingestion
Mikolaj Antoszkiewicz
2008-06-02 12:35:46 UTC
Permalink
Hello,

I've been trying to contribute a document through
(Entity_viewContributeFile form) Entity_contributeContent script.
During processsing I get an anauthorized exception in
'processing_status_workflow' on here.hasData()
It looks like security is unset yet, and user doesn't have any
permissions to check for that Data. Giving Entity_contributeContent
proxy role works, but I'm sure there might be a better way...

My question is what could be the other way? Is this a known issue?

Miko?aj
P.S. When the document is created user has intentional full access to it
P.P.S. Traceback included:


* <PythonScript at /erp5/Entity_contributeContent used for
/erp5/requirement_module/5>
Line 20
* Module AccessControl.ZopeGuards, line 341, in guarded_apply
* Module AccessControl.ZopeGuards, line 363, in builtin_guarded_apply
* Module Products.ERP5.Tool.ContributionTool, line 246, in newContent
* Module Products.ERP5Type.WebDAVSupport, line 233, in PUT_factory
* Module Products.CMFCore.TypesTool, line 930, in constructContent
* Module Products.Experimental.patches.ERP5Type_always_init_script,
line 58, in ERP5TypeInformation_constructInstance
* Module Products.CMFCore.TypesTool, line 354, in _finishConstruction
* Module Products.CMFCore.CMFCatalogAware, line 128, in
notifyWorkflowCreated
* Module Products.CMFCore.WorkflowTool, line 354, in notifyCreated
* Module Products.DCWorkflow.DCWorkflow, line 388, in notifyCreated
* Module Products.DCWorkflow.DCWorkflow, line 479, in _changeStateOf
* Module Products.DCWorkflow.DCWorkflow, line 458, in
_findAutomaticTransition
* Module Products.DCWorkflow.DCWorkflow, line 449, in
_checkTransitionGuard
* Module Products.DCWorkflow.Guard, line 90, in check
* Module Products.CMFCore.Expression, line 44, in __call__
* Module Products.PageTemplates.ZRPythonExpr, line 47, in __call__
__traceback_info__: here.hasData()
* Module Python expression "here.hasData()", line 1, in <expression>
* Module AccessControl.ImplPython, line 727, in guarded_getattr
* Module AccessControl.ImplPython, line 669, in aq_validate
* Module AccessControl.ImplPython, line 563, in validate
* Module AccessControl.ImplPython, line 461, in validate
* Module AccessControl.ImplPython, line 808, in raiseVerbose

Unauthorized: Your user account does not have the required permission.
Access to 'hasData' of (OOoDocument at
/erp5/portal_contributions/test_document.odt) denied. Your user account,
boss, exists at /erp5/acl_users. Access requires one of the following
roles: ['Assignee', 'Assignor', 'Associate', 'Auditor', 'Author',
'Manager']. Your roles in this context are ['Authenticated', 'Member',
'Owner'].

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3229 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mail.tiolive.com/pipermail/erp5-dev/attachments/20080602/96cb9ff9/attachment.bin>
Yusei TAHARA
2008-06-02 16:20:41 UTC
Permalink
HI,

On Mon, 02 Jun 2008 14:35:46 +0200
Post by Mikolaj Antoszkiewicz
Hello,
I've been trying to contribute a document through
(Entity_viewContributeFile form) Entity_contributeContent script.
During processsing I get an anauthorized exception in
'processing_status_workflow' on here.hasData()
It looks like security is unset yet, and user doesn't have any
permissions to check for that Data. Giving Entity_contributeContent
proxy role works, but I'm sure there might be a better way...
My question is what could be the other way? Is this a known issue?
Hmm, I don't get this problem. Which script calls hasData method?

And do you use a erp5 user account which correspond to a person document?
--
Yusei TAHARA <yusei at nexedi.com>
Mikolaj Antoszkiewicz
2008-06-03 07:43:48 UTC
Permalink
Post by Yusei TAHARA
HI,
On Mon, 02 Jun 2008 14:35:46 +0200
Post by Mikolaj Antoszkiewicz
Hello,
I've been trying to contribute a document through
(Entity_viewContributeFile form) Entity_contributeContent script.
During processsing I get an anauthorized exception in
'processing_status_workflow' on here.hasData()
It looks like security is unset yet, and user doesn't have any
permissions to check for that Data. Giving Entity_contributeContent
proxy role works, but I'm sure there might be a better way...
My question is what could be the other way? Is this a known issue?
Hmm, I don't get this problem. Which script calls hasData method?
- It's not a script, but an Expression on a Transition of
processing_status_workflow.
Post by Yusei TAHARA
And do you use a erp5 user account which correspond to a person document?
- Yes, it's a 'Person' user, NOT a 'zope' type from the root acl_users
folder. By the way, with user with Manager role (e.g. standard 'zope'
user) everything works fine.

Mikolaj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3229 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mail.tiolive.com/pipermail/erp5-dev/attachments/20080603/fe446bed/attachment.bin>
Loading...