Class DurableJobsSecurity

java.lang.Object
com.kingsrook.qqq.backend.core.jobs.DurableJobsSecurity

public final class DurableJobsSecurity extends Object
Puts the durable-jobs security keys into a session: jobs_user = the user's id, plus jobs_user_all_access for sessions holding the jobs_admin permission. A host calls applyToSession from its authentication customizer (QAuthenticationModuleCustomizerInterface.finalCustomizeSession), the same as for the alerts keys. The kernel also ensures the keys on the sessions it builds for workers and on launch/control calls, so a host that forgets still gets correct (owner-only) behaviour there; a session without the keys sees no jobs through the standard table screens (the lock fails closed).
  • Method Details

    • applyToSession

      public static void applyToSession(QSession session)
      Replace any jobs keys on the session with ones derived from its user and permissions. No-op for null and system sessions.
    • ensureSessionKeys

      public static void ensureSessionKeys(QSession session)
      Apply the keys only when the session has none yet.
    • userId

      public static String userId(QSession session)
      The id the jobs tables record as a job's owner.