Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Current »

In order to set a function (permission) for a site, you can add an entry to the tool registration xml, using the "function" tag.

Example:

 
<?xml version="1.0"?>
<registration>
        <tool
                        id="sakai.importtool"
                        title="Import"
                        description="Import tool.">
                <category name="course" />
                <category name="project" />
                
                
        </tool>
       <function name="import.view" /> 
</registration>

You can then inject the SecurityService in your service, and call this method:

boolean securityService.unlock( functionName, resourceId )

example: securityService.unlock ("import.view", "2005012003")

which will return true if the current user has import.view permission on site 2005012003.

  • No labels