Member Junction
    Preparing search index...

    Class EntityFieldPermissionInfo

    Field-level (column-level) security settings. Maps an entity FIELD to a role, carrying three independent trinary verbs — Read, Update and Create. One row per (field, role).

    These rows are only consulted when the parent entity has EntityInfo.EnableFieldLevelSecurity set. Aggregation across the roles a user holds, per verb: effective = (any matching row Allows) AND NOT (any matching row Denies). See EntityFieldInfo.GetUserFieldPermissions.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    __mj_CreatedAt: Date = null
    __mj_UpdatedAt: Date = null
    CreateAccess: FieldPermissionAccess = FieldPermissionAccess.NoAccess

    Whether this role may supply the field's value when INSERTing a record. Requires ReadAccess = Allow, on the same two-layer basis as UpdateAccess.

    A user who may not create a field does not get an error — the supplied value is dropped and the column takes its default, matching the read path where a denied field is simply absent.

    EntityField: string = null
    EntityFieldID: string = null
    ID: string = null

    Primary Key

    ReadAccess: FieldPermissionAccess = FieldPermissionAccess.NoAccess

    Whether this role may READ the field's values. The aggregation normalizes defensively and treats anything unrecognized as No Access, so a bad value off the wire fails closed rather than granting.

    Role: string = null
    RoleID: string = null
    UpdateAccess: FieldPermissionAccess = FieldPermissionAccess.NoAccess

    Whether this role may modify the field's value on an EXISTING record.

    Requires ReadAccess = Allow — a field a user cannot see is one they cannot change. Enforced per row by a CHECK constraint, and again after aggregation because the constraint cannot see across roles.

    Methods

    • Copies initialization data from a plain object to the class instance. Only copies properties that already exist on the class to prevent creating new fields. Special handling for DefaultValue fields to extract actual values from SQL Server syntax.

      Parameters

      • initData: any

        The initialization data object

      Returns void

    • Default JSON serialization for BaseInfo subclasses.

      Emits all non-underscored direct field declarations. For _-prefixed private backing fields (the MJ pattern for collection storage — e.g. _Fields, _RelatedEntities, _OrganicKeys), emits the value of the corresponding same-named public getter instead. Purely computed getters without a backing field (display-name formatters, derived flags) are intentionally skipped — they can throw when source fields are null and don't belong on the wire anyway.

      A _-backed getter that throws is omitted from the output rather than aborting the whole serialization. That omission is safe ONLY because such getters are recomputable: the backing field is a lazy cache over other serialized state (e.g. QueryInfo.CategoryPath over CategoryID), so the value is rebuilt on the next access after a warm boot. Do not add a _-backed getter whose value cannot be recomputed from the serialized fields — a throw would silently drop it.

      Nested BaseInfo instances and arrays of them unwrap automatically via JSON.stringify's native toJSON() protocol.

      Subclasses may override to emit a filtered subset or custom shape (see EntityFieldValueInfo).

      Returns Record<string, unknown>