Class AccessControl

AccessControl service provides high-level access checks, like testing user's permission or handling list queries access conditions.

Hierarchy

  • AccessControl

Constructors

Properties

_knownActions?: KnownActions

A cached list of known access check actions used by knownActions.

_rolesMgr: RolesManager
_runtimeConfig: RuntimeConfig

Access control hooks.

Accessors

Methods

  • This method is used to check if the user has the required permissions to preform the requested action

    TODO: Find the correct type of context. The 'src' property doesn't seem to be defined anywhere.

    Returns

    Parameters

    • context: KosmosUserContext<object> & {
          src?: string;
      }
    • type: string

      The entity type name

    • action: string

    Returns void

  • Parameters

    • cedarAccessDecision: Object
    • kosmosAccessDecision: boolean

    Returns boolean

  • Parameters

    Returns {
        accessKeys?: string[];
        contextStorage?: object;
        iss?: string;
        queryCache?: QueryCacheContext;
        tenant: string;
        user: string;
        user_email: string;
        user_roles: string[];
    }

    • Optional accessKeys?: string[]
    • Optional contextStorage?: object
    • Optional iss?: string
    • Optional queryCache?: QueryCacheContext
    • tenant: string
    • user: string
    • user_email: string
    • user_roles: string[]
  • Parameters

    • context: KosmosUserContext<object> & {
          src?: string;
      }
    • principal: Object
    • resource: Object
    • sourceVertex: Object
    • destinationVertex: Object
    • properties: Object
    • dataSourceWrapper: DataSourceWrapper
    • connectToVertices: never[] = []

    Returns Promise<{
        action: string;
        decision: Object;
        error?: undefined;
        principal: Object;
        resource: Object;
    } | {
        action: string;
        decision: boolean;
        error: unknown;
        principal: Object;
        resource: Object;
    }>

  • Parameters

    Returns Promise<{
        action: string;
        decision: Object;
        error?: undefined;
        principal: Object;
        resource: Object;
    } | {
        action: string;
        decision: boolean;
        error: unknown;
        principal: Object;
        resource: Object;
    }>

  • Parameters

    • context: KosmosUserContext<object> & {
          src?: string;
      }
    • principal: Object
    • resource: Object
    • sourceVertex: Object
    • destinationVertex: Object
    • dataSourceWrapper: DataSourceWrapper
    • connectToVertices: never[] = []

    Returns Promise<{
        action: string;
        decision: Object;
        error?: undefined;
        principal: Object;
        resource: Object;
    } | {
        action: string;
        decision: boolean;
        error: unknown;
        principal: Object;
        resource: Object;
    }>

  • Parameters

    Returns Promise<{
        action: string;
        decision: Object;
        error?: undefined;
        principal: Object;
        resource: Object;
    } | {
        action: string;
        decision: boolean;
        error: unknown;
        principal: Object;
        resource: Object;
    }>

  • Parameters

    • context: KosmosUserContext<object> & {
          src?: string;
      }
    • principal: Object
    • resource: Object
    • sourceVertex: Object
    • destinationVertex: Object
    • properties: Object
    • dataSourceWrapper: DataSourceWrapper

    Returns Promise<{
        action: string;
        decision: Object;
        error?: undefined;
        principal: Object;
        resource: Object;
    } | {
        action: string;
        decision: boolean;
        error: unknown;
        principal: Object;
        resource: Object;
    }>

  • Parameters

    Returns Promise<{
        action: string;
        decision: Object;
        error?: undefined;
        principal: Object;
        resource: Object;
    } | {
        action: string;
        decision: boolean;
        error: unknown;
        principal: Object;
        resource: Object;
    }>

  • Returns a boolean showing if verified permission check is enabled.

    Returns boolean

  • Validates the access check action.

    Returns

    The same value if it's valid; throws an error otherwise.

    Parameters

    • action: string

      The access check action.

    Returns string

Generated using TypeDoc