org.sakaiproject.tool.gradebook.facades.sakai2impl
Class AuthzSakai2Impl

java.lang.Object
  extended byorg.sakaiproject.tool.gradebook.facades.sections.AbstractSectionsImpl
      extended byorg.sakaiproject.tool.gradebook.facades.sections.AuthzSectionsImpl
          extended byorg.sakaiproject.tool.gradebook.facades.sakai2impl.AuthzSakai2Impl
All Implemented Interfaces:
Authz

public class AuthzSakai2Impl
extends AuthzSectionsImpl
implements Authz

An implementation of Gradebook-specific authorization needs based on a combination of fine-grained site-scoped Sakai permissions and the shared Section Awareness API. This is a transtional stage between coarse-grained site-and-role-based authz and our hoped-for fine-grained role-determined group-scoped authz.


Field Summary
static String PERMISSION_EDIT_ASSIGNMENTS
           
static String PERMISSION_GRADE_ALL
           
static String PERMISSION_GRADE_SECTION
           
static String PERMISSION_VIEW_OWN_GRADES
           
 
Constructor Summary
AuthzSakai2Impl()
           
 
Method Summary
 void init()
          Perform authorization-specific framework initializations for the Gradebook.
 boolean isUserAbleToEditAssessments(String gradebookUid)
           
 boolean isUserAbleToGrade(String gradebookUid)
           
 boolean isUserAbleToGradeAll(String gradebookUid)
           
 boolean isUserAbleToGradeSection(String sectionUid)
          When group-scoped permissions are available, this is where they will go.
 boolean isUserAbleToViewOwnGrades(String gradebookUid)
           
 
Methods inherited from class org.sakaiproject.tool.gradebook.facades.sections.AuthzSectionsImpl
findMatchingEnrollments, getAuthn, getAvailableEnrollments, getAvailableSections, getSectionAwareness, getSectionEnrollments, isUserAbleToGradeStudent, setAuthn, setSectionAwareness
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.sakaiproject.tool.gradebook.facades.Authz
findMatchingEnrollments, getAvailableEnrollments, getAvailableSections, getSectionEnrollments, isUserAbleToGradeStudent
 

Field Detail

PERMISSION_GRADE_ALL

public static final String PERMISSION_GRADE_ALL
See Also:
Constant Field Values

PERMISSION_GRADE_SECTION

public static final String PERMISSION_GRADE_SECTION
See Also:
Constant Field Values

PERMISSION_EDIT_ASSIGNMENTS

public static final String PERMISSION_EDIT_ASSIGNMENTS
See Also:
Constant Field Values

PERMISSION_VIEW_OWN_GRADES

public static final String PERMISSION_VIEW_OWN_GRADES
See Also:
Constant Field Values
Constructor Detail

AuthzSakai2Impl

public AuthzSakai2Impl()
Method Detail

init

public void init()
Perform authorization-specific framework initializations for the Gradebook.


isUserAbleToGrade

public boolean isUserAbleToGrade(String gradebookUid)
Specified by:
isUserAbleToGrade in interface Authz
Overrides:
isUserAbleToGrade in class AuthzSectionsImpl

isUserAbleToGradeAll

public boolean isUserAbleToGradeAll(String gradebookUid)
Specified by:
isUserAbleToGradeAll in interface Authz
Overrides:
isUserAbleToGradeAll in class AuthzSectionsImpl

isUserAbleToGradeSection

public boolean isUserAbleToGradeSection(String sectionUid)
When group-scoped permissions are available, this is where they will go. My current assumption is that the call will look like: return hasPermission(sectionUid, PERMISSION_GRADE_ALL);

Specified by:
isUserAbleToGradeSection in interface Authz
Overrides:
isUserAbleToGradeSection in class AuthzSectionsImpl

isUserAbleToEditAssessments

public boolean isUserAbleToEditAssessments(String gradebookUid)
Specified by:
isUserAbleToEditAssessments in interface Authz
Overrides:
isUserAbleToEditAssessments in class AuthzSectionsImpl

isUserAbleToViewOwnGrades

public boolean isUserAbleToViewOwnGrades(String gradebookUid)
Specified by:
isUserAbleToViewOwnGrades in interface Authz
Overrides:
isUserAbleToViewOwnGrades in class AuthzSectionsImpl