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 org.deltava.security.command.AccessControl
_ctx
-
Constructor Summary
ConstructorsConstructorDescriptionVideoAccessControl
(SecurityContext ctx, Collection<Course> courses) Initializes the Access Controller. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns whether the user can view this Video.void
updateContext
(Video video) Updates the video to validate access for.void
validate()
Calculates access rights.Methods inherited from class org.deltava.security.command.AccessControl
validateContext
-
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
-