class

PlaceOS::Model::GroupInvitation

Inherits PlaceOS::Model::GroupHistory::Mixin < PgORM::Timestamps < PgORM::Base < PgORM::Validators < PgORM::Table < PgORM::Persistence < PgORM::Associations < ActiveModel::Callbacks < ActiveModel::Validation < ActiveModel::Model < DB::Mappable < DB::Serializable < YAML::Serializable < JSON::Serializable < Reference < Object

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

Constants

CALLBACKS = { before_save: [do if (__temp_1203 = @group) && __temp_1203.new_record? __temp_1203.save self.group_id = __temp_1203.id.not_nil! end end, :normalise_email, :capture_history_state] of Nil, after_save: [:record_history_save] of Nil, before_create: [do self.created_at = self.updated_at = Time.utc end] of Nil, after_create: [] of Nil, before_update: [do self.updated_at = Time.utc end] of Nil, after_update: [] of Nil, before_destroy: [] of Nil, after_destroy: [do end, :record_history_destroy] of Nil, }

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

PRIMARY_KEY_TYPES = {:id => UUID} of Nil => Nil

macro level key => type

PRIMARY_KEYS = [{:id}]

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

Constructors

build_with_secret(group : Group, email : String, permissions : Permissions = Permissions::None, expires_at : Time | Nil = nil) : self

Build a fresh invitation, generating a cryptographically strong secret. The returned instance exposes .plaintext_secret only until the current process ends; it is not reloadable from the database.

Source
from_json(string_or_io : String | IO, trusted : Bool = false) : self

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

from_json(string_or_io : String | IO, root : String, trusted : Bool = false) : self

Deserializes the given JSON in string_or_io into an instance of self, assuming the JSON consists of an JSON object with key root, and whose value is the value to deserialize. Will not deserialise from fields with mass_assign: false

class User < ActiveModel::Model
  attribute name : String
  attribute google_id : UUID, mass_assign: false
end

User.from_json(%({"main": {"name": "Jason", "google_id": "f6f70bfb-c882-446d-8758-7ce47db39620"}}), root: "main") # => #<User:0x103131b20 @name="Jason">
from_trusted_json(string_or_io : String | IO, root : String) : self

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

from_trusted_json(string_or_io : String | IO) : self

Serialize from a trusted JSON source

from_trusted_yaml(string_or_io : String | IO) : self

Serialize from a trusted YAML source

from_yaml(string_or_io : String | IO, trusted : Bool = false) : self

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

Source
new(pull : JSON::PullParser)

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

Source
new(rs : DB::ResultSet)

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

new(created_at : Time | ActiveModel::Model::None = ::ActiveModel::Model::None.new, updated_at : Time | ActiveModel::Model::None = ::ActiveModel::Model::None.new, id : UUID | ActiveModel::Model::None = ::ActiveModel::Model::None.new, email : String | ActiveModel::Model::None = ::ActiveModel::Model::None.new, secret_digest : String | ActiveModel::Model::None = ::ActiveModel::Model::None.new, permissions : Int32 | ActiveModel::Model::None = ::ActiveModel::Model::None.new, expires_at : Time | Nil | ActiveModel::Model::None = ::ActiveModel::Model::None.new, group_id : UUID | ActiveModel::Model::None = ::ActiveModel::Model::None.new)

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

Initialize PlaceOS::Model::GroupInvitation from HTTP::Params.

Class methods

attributes

Returns all attribute keys.

by_group_id(id)
Source
changes(id : UUID | Nil = nil) : ChangeFeed

Changefeed at row (if id passed) or whole table level. Returns a ChangeFeed instance which can be used to invoke async callbacks via on or use blocking Iterator via each method.

digest_secret(plaintext : String) : String

SHA256 hex digest of a plaintext secret.

Source
find_by_secret?(plaintext : String) : self | Nil

Find an invitation by its plaintext secret (constant cost; the unique index is on secret_digest). Returns nil if no match or the invitation has expired.

Source
from_rs(__temp_2372 : DB::ResultSet)

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

on_error(err : Exception | IO::Error)

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

primary_key

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

Source
table_name

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

Instance methods

accept!(user : User) : GroupUser

Accept the invitation for the given user. Creates (or updates) a GroupUser row with the invitation's permissions, then destroys the invitation. Raises if the invitation has expired.

Source
acting_user
acting_user=(acting_user : PlaceOS::Model::User | Nil)
after_create

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

after_destroy

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

after_initialize(trusted : Bool)

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

after_save

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

after_update

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

apply_defaults

Generate code to apply default values

assign_attributes(created_at : Time | Missing = Missing, updated_at : Time | Missing = Missing, id : UUID | Missing = Missing, email : String | Missing = Missing, secret_digest : String | Missing = Missing, permissions : Int32 | Missing = Missing, expires_at : Time | Nil | Missing = Missing, group_id : UUID | Missing = Missing)

Assign to multiple attributes.

assign_attributes(params : HTTP::Params | Hash(String, String) | Tuple(String, String))

Assign to multiple attributes via HTTP::Params.

assign_attributes(model : PlaceOS::Model::GroupInvitation)

Assign to multiple attributes from a model object

assign_attributes_from_json(json, root : String)

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

assign_attributes_from_json(json)

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

assign_attributes_from_trusted_json(json, root : String)

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

assign_attributes_from_trusted_json(json)

Assign each field from JSON if field exists in JSON and has changed in model

assign_attributes_from_trusted_yaml(yaml)

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

assign_attributes_from_yaml(yaml)

Uses the YAML parser as JSON is valid YAML

attributes

Returns a Hash of all attribute values

attributes_tuple

Returns a NamedTuple of all attribute values.

before_create

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

before_destroy

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

before_save

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

before_update

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

build_group
Source
captured_changed_fields
captured_changed_fields=(captured_changed_fields : Array(String))
changed?

Check if any attributes have changed.

changed_attributes

Returns a Hash with all changed attributes.

changed_json(io : IO) : Nil

Serialize the set of changed attributes to JSON.

changed_json

Serialize the set of changed attributes to JSON.

changed_persist_attributes

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

changed_yaml(io : IO) : Nil

Serialize the set of changed attributes to YAML.

changed_yaml

Serialize the set of changed attributes to YAML.

clear_changes_information

Reset changes for all attributes.

create_group
Source
create_group!
Source
created_at

created_at getter

created_at=(value : Time)

Setters created_at setter

created_at?

NOTE: use getter / getter! (not property / property!) so that the setter defined later in __create_initializer__ is the only setter on the field. Crystal's overload resolution silently fails to replace a property-defined setter with one of identical signature for generic types (e.g. Set(String)?, Array(String)?, String | Array(String)), although it does work for non-generic ones like String?. Defining the setter only once via __create_initializer__ ensures change tracking, sanitization, and custom setter blocks run uniformly across all types.

created_at_assigned?

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

created_at_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

created_at_changed?

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

created_at_default

created_at's default value

created_at_present?
created_at_removed?

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

created_at_was

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

created_at_will_change!

Include created_at in the set of changed attributes, whether it has changed or not.

email

email getter

email=(value : String)

email setter

email?

NOTE: use getter / getter! (not property / property!) so that the setter defined later in __create_initializer__ is the only setter on the field. Crystal's overload resolution silently fails to replace a property-defined setter with one of identical signature for generic types (e.g. Set(String)?, Array(String)?, String | Array(String)), although it does work for non-generic ones like String?. Defining the setter only once via __create_initializer__ ensures change tracking, sanitization, and custom setter blocks run uniformly across all types.

email_assigned?

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

email_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

email_changed?

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

email_default

email's default value

Source
email_present?
email_removed?

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

email_was

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

email_will_change!

Include email in the set of changed attributes, whether it has changed or not.

expired?
Source
expires_at

expires_at getter

expires_at=(value : Time | Nil)

expires_at setter

expires_at_assigned?

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

expires_at_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

expires_at_changed?

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

expires_at_default

expires_at's default value

Source
expires_at_present?
expires_at_removed?

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

expires_at_was

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

expires_at_will_change!

Include expires_at in the set of changed attributes, whether it has changed or not.

group
Source
group!
Source
group=(record : Group) : Group
Source
group?
Source
group_history_resource_type
Source
group_id

group_id getter

group_id=(value : UUID)

group_id setter

group_id?

NOTE: use getter / getter! (not property / property!) so that the setter defined later in __create_initializer__ is the only setter on the field. Crystal's overload resolution silently fails to replace a property-defined setter with one of identical signature for generic types (e.g. Set(String)?, Array(String)?, String | Array(String)), although it does work for non-generic ones like String?. Defining the setter only once via __create_initializer__ ensures change tracking, sanitization, and custom setter blocks run uniformly across all types.

group_id_assigned?

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

group_id_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

group_id_changed?

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

group_id_default

group_id's default value

Source
group_id_present?
group_id_removed?

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

group_id_was

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

group_id_will_change!

Include group_id in the set of changed attributes, whether it has changed or not.

id

id getter

id=(value : UUID)

id setter

id?

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

id_assigned?

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

id_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

id_changed?

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

id_default

id's default value

id_present?
id_removed?

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

id_was

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

id_will_change!

Include id in the set of changed attributes, whether it has changed or not.

invoke_props

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

permission_flags
Source
permission_flags=(flags : Permissions)
Source
permissions

permissions getter

permissions=(value : Int32)

permissions setter

permissions?

NOTE: use getter / getter! (not property / property!) so that the setter defined later in __create_initializer__ is the only setter on the field. Crystal's overload resolution silently fails to replace a property-defined setter with one of identical signature for generic types (e.g. Set(String)?, Array(String)?, String | Array(String)), although it does work for non-generic ones like String?. Defining the setter only once via __create_initializer__ ensures change tracking, sanitization, and custom setter blocks run uniformly across all types.

permissions_assigned?

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

permissions_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

permissions_changed?

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

permissions_default

permissions's default value

Source
permissions_present?
permissions_removed?

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

permissions_was

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

permissions_will_change!

Include permissions in the set of changed attributes, whether it has changed or not.

persistent_attributes

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

plaintext_secret

Plaintext secret — only set transiently on newly-created invitations (by the .build_with_secret factory). Never persisted, never serialised. Callers must capture this before the invitation is handed off to any other consumer.

Source
plaintext_secret=(plaintext_secret : String | Nil)

Plaintext secret — only set transiently on newly-created invitations (by the .build_with_secret factory). Never persisted, never serialised. Callers must capture this before the invitation is handed off to any other consumer.

Source
primary_key

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

Source
primary_key_hash

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

reload_group
Source
reload_group?
Source
restore_attributes

Reset each attribute to their previous values and clears all changes.

secret_digest

secret_digest getter

secret_digest=(value : String)

secret_digest setter

secret_digest?

NOTE: use getter / getter! (not property / property!) so that the setter defined later in __create_initializer__ is the only setter on the field. Crystal's overload resolution silently fails to replace a property-defined setter with one of identical signature for generic types (e.g. Set(String)?, Array(String)?, String | Array(String)), although it does work for non-generic ones like String?. Defining the setter only once via __create_initializer__ ensures change tracking, sanitization, and custom setter blocks run uniformly across all types.

secret_digest_assigned?

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

secret_digest_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

secret_digest_changed?

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

secret_digest_default

secret_digest's default value

Source
secret_digest_present?
secret_digest_removed?

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

secret_digest_was

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

secret_digest_will_change!

Include secret_digest in the set of changed attributes, whether it has changed or not.

table_name

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

updated_at

updated_at getter

updated_at=(value : Time)

updated_at setter

updated_at?

NOTE: use getter / getter! (not property / property!) so that the setter defined later in __create_initializer__ is the only setter on the field. Crystal's overload resolution silently fails to replace a property-defined setter with one of identical signature for generic types (e.g. Set(String)?, Array(String)?, String | Array(String)), although it does work for non-generic ones like String?. Defining the setter only once via __create_initializer__ ensures change tracking, sanitization, and custom setter blocks run uniformly across all types.

updated_at_assigned?

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

updated_at_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

updated_at_changed?

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

updated_at_default

updated_at's default value

updated_at_present?
updated_at_removed?

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

updated_at_was

Grants a user who is not yet in the system (or external) access to a group via a shared secret. The plaintext secret is generated at creation time and returned to the caller once; only its SHA256 digest is persisted. Accepting an invitation materialises it into a GroupUser and then destroys the invitation.

updated_at_will_change!

Include updated_at in the set of changed attributes, whether it has changed or not.

validate_nilability

Validate that all non-nillable fields have values.

was_new_record=(was_new_record : Bool)
was_new_record?

Nested types