Created
May 18, 2009 04:32
-
-
Save jimmydivvy/113317 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Get the first assessments that link to the current one, and grant access if we can view it | |
def currentuser = context.getUser(); // The current user object | |
def assessment = args["assessment"]; | |
def incoming_links = assessment.getLinksTo(); | |
if( incoming_links ) | |
{ | |
def first_incoming = incoming_links[0]; // We assume only one incoming link | |
return first_incoming.canView(); // Could also use canEdit() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment