-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Joachim Schmitz wrote:
> Julien Anguenot wrote:
>>>> If he clicks on the url, he is asked for login. How can I
>>>> test in the pt, if that item is accessible by the user, so that the link
>>>> is not displayed at all.
>>>>
>>
>> You may use the checkPerm utility defined within the main_template.pt:
>>
>> <tal:block condition="checkPerm('View', item)>
>> <!-- display the item URL -->
>> </tal:block>
>>
>> Note, that checkPerm is an alias for portal_membership.checkPermission()
>>
> Thanks Julien, I tried that, but it didn't achieve the result I wanted.
> Perhaps I am doing something wrong.
>
> Here is my usecase:
>
> I have in sections a studentsfolder, where I gave the localrole
> "SectionReader" to all users.
> In this studentsfolder I have one folder for each student, in this
> folder I block acquisition for local roles, and uncheck the
> SectionReader localrole.
>
> But the folder is still accessible by anonymous. I want to achieve that
> the Student is only accessible, by the owner and the StudentManager.
>
> How can I acchieve this ?
>
1. Block the local roles acquisition within this folder.
2. Give the SectionReader local roles to the student group I guess.
Here, Anonymous should *not* be able to access the sub-section.
3. Give the SectionManager local roles to the student manager group.
That should be it.
Which version of CPS are your using ?
J.
- --
Julien Anguenot | Nuxeo R&D (Paris, France)
CPS Platform : http://www.cps-project.org
Zope3 / ECM : http://www.z3lab.org
mail: anguenot at nuxeo.com; tel: +33 (0) 6 72 57 57 66
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFDbqvOGhoG8MxZ/pIRAv2QAJ4jt9UyuA7lST84/GuNNo3av14JogCggR4y
H7+OHD6ff47PDV/ZndLezXc=
=ZnoH
-----END PGP SIGNATURE-----
_______________________________________________
cps-devel mailing list
http://lists.nuxeo.com/mailman/listinfo/cps-devel