Class PilotAccessControl

java.lang.Object
org.deltava.security.command.AccessControl
org.deltava.security.command.PilotAccessControl
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
CrossAppPilotAccessControl

public class PilotAccessControl extends AccessControl
An access controller for Pilot profile operations.
Since:
1.0
Version:
11.2
Author:
Luke
See Also:
  • Field Details

    • _p

      protected final Pilot _p
  • Constructor Details

    • PilotAccessControl

      public PilotAccessControl(SecurityContext ctx, Pilot p)
      Initializes the Access controller.
      Parameters:
      ctx - the command context
      p - the Pilot profile
  • Method Details

    • validate

      public void validate()
      Description copied from class: AccessControl
      Calculates access control rights
      Specified by:
      validate in class AccessControl
    • getCanView

      public boolean getCanView()
      Returns whether the pilot profile can be viewed.
      Returns:
      TRUE if viewable, otherwise FALSE
    • getIsOurs

      public boolean getIsOurs()
      Returns if we are currently accessing our own profile.
      Returns:
      TRUE if the profile is that of the currently logged in user, otherwise FALSE
    • getCanEdit

      public boolean getCanEdit()
      Returns if the pilot profile can be edited.
      Returns:
      TRUE if the profile can be edited, otherwise FALSE
    • getCanTakeLeave

      public boolean getCanTakeLeave()
      Returns if the Pilot can be pleaced On Leave.
      Returns:
      TRUE if the Pilot can be placed on Leave, otherwise FALSE
    • getCanViewEmail

      public boolean getCanViewEmail()
      Returns if the e-mail address can be viewed.
      Returns:
      TRUE if the address can be viewed, otherwise FALSE
    • getCanViewPush

      public boolean getCanViewPush()
      Returns if push notification endpoint data can be viewed.
      Returns:
      TRUE if the endpoint data can be viewed, otherwise FALSE
    • getCanViewExams

      public boolean getCanViewExams()
      Returns if the Pilot's examination history can be viewed.
      Returns:
      TRUE if the exams can be viewed, otherwise FALSE
    • getCanChangeStatus

      public boolean getCanChangeStatus()
      Returns if the pilot's status can be edited.
      Returns:
      TRUE if the status can be edited, otherwise FALSE
    • getCanInactivate

      public boolean getCanInactivate()
      Returns if the Pilot can be suspended/inactivated.
      Returns:
      TRUE if the Pilot can be inactivated, otherwise FALSE
    • getCanAssignRide

      public boolean getCanAssignRide()
      Returns if a check ride can be assigned to this Pilot.
      Returns:
      TRUE if a check ride can be assigned, otherwise FALSE
    • getCanPromote

      public boolean getCanPromote()
      Returns if the pilot can be promoted.
      Returns:
      TRUE if the rank/equipment type can be edited, otherwise FALSE
    • getCanChangeRoles

      public boolean getCanChangeRoles()
      Returns if the pilot's access roles can be edited.
      Returns:
      TRUE if the access roles can be edited, otherwise FALSE
    • getCanChangeStaffProfile

      public boolean getCanChangeStaffProfile()
      Returns if the pilot's staff profile can be edited.
      Returns:
      TRUE if the staff profile can be edited, otherwise FALSE
    • getCanChangeMailProfile

      public boolean getCanChangeMailProfile()
      Returns if the pilot's IMAP mailbox profile can be edited.
      Returns:
      TRUE if the mailbox profile can be edited, otherwise FALSE
    • getCanChangeSignature

      public boolean getCanChangeSignature()
      Returns if the pilot's Water Cooler signature image can be edited.
      Returns:
      TRUE if the signature image can be edited, otherwise FALSE
    • getCanTransfer

      public boolean getCanTransfer()
      Returns if the Pilot can be transferred to another airline.
      Returns:
      TRUE if the Pilot can be transferred, otherwise FALSE
    • getCanActivate

      public boolean getCanActivate()
      Returns if the pilot can be activated. This is a convenience method, since it just checks if the Pilot is Inactive or Retired, and the canChangeStatus property is TRUE.
      Returns:
      TRUE if the Pilot can be activated, otherwise FALSE
      See Also: