Class VideoAccessControl
java.lang.Object
org.deltava.security.command.AccessControl
org.deltava.security.command.VideoAccessControl
- All Implemented Interfaces:
Serializable
An Access Controller for Flight Academy training videos.
- Since:
- 1.0
- Version:
- 7.0
- Author:
- Luke
- See Also:
-
Field Summary
Fields inherited from class AccessControl
_ctx -
Constructor Summary
ConstructorsConstructorDescriptionVideoAccessControl(SecurityContext ctx, Collection<Course> courses) Initializes the Access Controller. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether the user can view this Video.voidupdateContext(Video video) Updates the video to validate access for.voidvalidate()Calculates access rights.Methods inherited from class AccessControl
validateContextModifier and TypeMethodDescriptionprotected voidValidates the command context for this access controller.
-
Constructor Details
-
VideoAccessControl
Initializes the Access Controller.- Parameters:
ctx- the security contextcourses- the student's currently enrollled courses
-
-
Method Details
-
updateContext
Updates the video to validate access for.- Parameters:
video- the Video to check
-
validate
-
getCanRead
public boolean getCanRead()Returns whether the user can view this Video.- Returns:
- TRUE if the video can be read, otherwise FALSE
-