Documentation
¶
Index ¶
- func FindOrganizationByNamespace(app core.App, namespace string) (*core.Record, error)
- func GetOrganizationCanonifiedName(app core.App, orgID string) (string, error)
- func GetUserOrganization(app core.App, userID string) (*core.Record, error)
- func GetUserOrganizationCanonifiedName(app core.App, userID string) (string, error)
- func GetUserOrganizationID(app core.App, userID string) (string, error)
- func LoadHiddenRequestFields(e *core.RecordRequestEvent, fieldNames ...string) (map[string]any, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindOrganizationByNamespace ¶
FindOrganizationByNamespace returns the organization whose canonified name is namespace, ignoring surrounding spaces. A missing or blank namespace returns an error wrapping sql.ErrNoRows.
func GetUserOrganization ¶
func GetUserOrganizationID ¶
func LoadHiddenRequestFields ¶
func LoadHiddenRequestFields( e *core.RecordRequestEvent, fieldNames ...string, ) (map[string]any, error)
LoadHiddenRequestFields loads the submitted values of the given hidden fields into the request record and returns them, keyed by field name.
PocketBase drops hidden fields from non-superuser create and update requests. Bind it to OnRecordCreateRequest or OnRecordUpdateRequest: those hooks run after the collection create or update rule has authorized the write, so the caller may set the fields it was already allowed to write. Superuser requests keep their hidden fields and return nil.
Types ¶
This section is empty.