[Building Sakai] Setting a resource's permissions

Diego del Blanco Orobitg diego.delblanco at samoo.es
Wed Sep 5 04:24:21 PDT 2012


There is the hide option for any folder or file in resources. 

Maybe instead try  to change permissions, you can use "public void
setAvailability(boolean hidden, Time releaseDate, Time retractDate)" from
the ContentHostingService to edit a collection and hide a folder to the
users without the permission of "view hidden resources". Students usually
have this permission disabled by default and instructors have it enabled.

Saludos!


Diego del Blanco Orobitg
Director de operaciones
diego.delblanco at samoo.es
Tlf Oficina: 673 80 32 69
Tlf Móvil: 653 683 489
www.samoo.es

-----Mensaje original-----
De: sakai-dev-bounces at collab.sakaiproject.org
[mailto:sakai-dev-bounces at collab.sakaiproject.org] En nombre de Brian
Baillargeon
Enviado el: martes, 04 de septiembre de 2012 20:33
Para: sakai-dev at collab.sakaiproject.org
Asunto: [Building Sakai] Setting a resource's permissions

Hi all,

I'm working on a fork of the certification tool. I want the tool to save
PDFs somewhere in the site's resources rather than root/certification/...
However, I don't want students to have any permissions to view/modify the
template PDFs, so I want to disable all of the resource permissions (such as
Create resources, Read resources...) on the related directories for roles
who don't have certificate.admin permissions.

So for example, if we had
root/certification/templates/<siteId>/<certificateDefinitionId>/myPdf.pdf
In my implementation it should be somewhere like
<siteCollection>/certification/templates/<certificateDefinitionId>/myPdf.pdf
and the <siteCollection>/certification/templates/ folder's permissions would
all be enabled for Instructor and disabled for Student

I've been poking around ContentHostingService, and I see ways to check for
permissions but nothing to set them. I also poked around in
AuthzGroupService, but didn't see how to use it with ContentResources.
Does anybody know a way to set permissions on a ContentCollection?

Thanks,
Brian
_______________________________________________
sakai-dev mailing list
sakai-dev at collab.sakaiproject.org
http://collab.sakaiproject.org/mailman/listinfo/sakai-dev

TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org
with a subject of "unsubscribe"



More information about the sakai-dev mailing list