External Source permissions issue
Andy Altepeter <[email protected]>
| Newsgroups | gmane.comp.web.zope.silva.devel |
|---|---|
| Organization | Bethel University |
| Message-ID | <[email protected]> |
Hi All,
I have a code source in my silva root wich can be used to include a silva
document within another doc. One of our authors (who only has SMI access to
a directory two levels inside the root) wanted to use this cs but was
recieving an 'Unauthorized' error (traceback below)
I've tracked this down to the class-level permissions on
ExternalSource.form(). It's set to SilvaPermissions.ReadSilvaContent.
Obviously this author does not have a 'ReadSilvaContent' role at the silva
root, so they are unable to use this code source.
Would it be possible to have a 'form_for_document' function which checks the
permissions on the document and has public access?
For now, I've set the perms to SilvaPermissions.ViewAuthenticated, which
should work.
Cheers,
Andy
Traceback (innermost last):
* Module ZPublisher.Publish, line 101, in publish
* Module ZPublisher.mapply, line 88, in mapply
* Module ZPublisher.Publish, line 39, in call_object
* Module Products.FileSystemSite.FSPythonScript, line 104, in __call__
* Module Shared.DC.Scripts.Bindings, line 306, in __call__
* Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec
* Module Products.FileSystemSite.FSPythonScript, line 160, in _exec
* Module None, line 4, in save
<FSPythonScript at /silva/service_widgets/save used
for /silva/service_widgets/element/doc_elements/source/mode_edit>
Line 4
* Module Products.FileSystemSite.FSPythonScript, line 104, in __call__
* Module Shared.DC.Scripts.Bindings, line 306, in __call__
* Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec
* Module Products.FileSystemSite.FSPythonScript, line 160, in _exec
* Module None, line 51, in save_helper
<FSPythonScript
at /silva/service_widgets/element/doc_elements/source/mode_edit/save_helper>
Line 51