[Building Sakai] Displaying Course Tool only to Administrators in Sakai

Kara Stiles kara.stiles at rsmart.com
Fri Apr 8 10:27:33 PDT 2011


I'm not sure how the code works because I don't write code, but I do know
that most tools have a configured functions.require value in their tool
registration file and the value for this config setting sets the permission
one must have in order to view the tool.

For example, the permission required in order to view the resources tool is
content.read.

I know this because it's in the sakai.resources.xml file like this:


      <configuration name="functions.require" value="content.read"/>


So through this functions.require value in the tool reg file, you set the
default required permission for the tool for all sites.



You can also change the functions.require value for the tool in a site using
the Sites tool in the administration workspace to reset the
functions.require value for that site only (though if you're using the Page
Order Helper, it might make more sense to just use that to hide a tool).

An example would be if you wanted to hide the Resources tool from students
in a single site.  You'd do this:

1. Access the Sites tool from the Administration Workspace
2. Locate and select the site whose Resources tool you wish to edit
3. Click Pages
4. Click the Page ID for the resources tool
5. Click Tools
6. Click the tool Id for the resources tool
7. Scroll down to the bottom.  You will see, within the configuration
section, a field called "functions.require."  This  field contains the
permission that a role MUST have in order to view the tool
8. Remove the content.read permission from the functions.require field
9. Add a different permission to the function.require field.  We suggest
content.new (this is the NEW permission for resources) or possibly site.upd
(this is the permission that gives the instructor access to the Site Editor
and all the subtools within it).

The functions.require permission config can really just be any permission
that exists within the site.  It doesn't need to have anything to do with
the tool you're configuring.


Here's more fun reading. I'm not sure how on point these are but it might be
worth a look:

https://jira.sakaiproject.org/browse/SAK-4120

https://confluence.sakaiproject.org/display/DOC/2.3+Release+Notes

https://jira.sakaiproject.org/browse/SAK-7570

On Fri, Apr 8, 2011 at 9:58 AM, Jennings, Michael <mike_jennings at unc.edu>wrote:

>  Kara,
>
>
>
> That is very interesting but I have never used the functions.requrie value
> in a tool.  Can you point me to some more information about this on the
> wiki?  I apologize as this is the first tool that I have created in Sakai
> and I sure do have a lot to learn.  I think that the function.requrie
> permission would be great, as it will provide me with a lot of flexibility.
>
>
>
> Thanks,
>
>
>
> Mike Jennings
>
>
>
>
> ==============================================================================
>
> Mike Jennings
>
> Teaching and Learning Developer
>
> University of North Carolina at Chapel Hill
>
>
>
> Office: (919) 843-5013
>
> Cell: (919) 442-8337
>
> E-mail: mike_jennings at unc.edu
>
>
>
> *From:* Kara Stiles [mailto:kara.stiles at rsmart.com]
> *Sent:* Friday, April 08, 2011 12:53 PM
> *To:* Jennings, Michael
> *Cc:* sakai-dev at collab.sakaiproject.org
> *Subject:* Re: [Building Sakai] Displaying Course Tool only to
> Administrators in Sakai
>
>
>
> can you set the functions.require value to a permission that only the
> administrators have?
>
> That way, if other schools use your blackboard migration tool and they want
> folks other than admins to have access to the tool, they could just change
> the functions.require value to something else.
>
> On Fri, Apr 8, 2011 at 9:45 AM, Jennings, Michael <mike_jennings at unc.edu>
> wrote:
>
> I am currently in the process of creating a blackboard migration tool that
> can be added to a course site in sakai.  What I would like to figure out is
> how to make the tool display in the tools list only if the user is in the
> administrators group.  I would like to hid the tool from displaying in the
> course site’s tools list for all other users.  Basically I would like to
> provide the functionality so that only administrators can add the tool to a
> site, but really be hidden to all other users.
>
>
>
> Can someone point me in the right direction on where to find this
> information or how to configure my tool to do this.
>
>
>
> Thanks,
>
>
>
> Mike Jennings
>
>
>
>
> ==============================================================================
>
> Mike Jennings
>
> Teaching and Learning Developer
>
> University of North Carolina at Chapel Hill
>
>
>
> Office: (919) 843-5013
>
> Cell: (919) 442-8337
>
> E-mail: mike_jennings at unc.edu
>
>
>
>
> _______________________________________________
> 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"
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20110408/0c0ccf38/attachment.html 


More information about the sakai-dev mailing list