Class VideoAccessControl

java.lang.Object
org.deltava.security.command.AccessControl
org.deltava.security.command.VideoAccessControl
All Implemented Interfaces:
Serializable

public class VideoAccessControl extends AccessControl
An Access Controller for Flight Academy training videos.
Since:
1.0
Version:
7.0
Author:
Luke
See Also:
  • Constructor Details

    • VideoAccessControl

      public VideoAccessControl(SecurityContext ctx, Collection<Course> courses)
      Initializes the Access Controller.
      Parameters:
      ctx - the security context
      courses - the student's currently enrollled courses
  • Method Details

    • updateContext

      public void updateContext(Video video)
      Updates the video to validate access for.
      Parameters:
      video - the Video to check
    • validate

      public void validate()
      Calculates access rights.
      Specified by:
      validate in class AccessControl
    • getCanRead

      public boolean getCanRead()
      Returns whether the user can view this Video.
      Returns:
      TRUE if the video can be read, otherwise FALSE