Documentation ¶
Index ¶
- func GetAuthnInferredOrgID(ctx context.Context) sdktypes.OrgID
- func GetAuthnUser(ctx context.Context) sdktypes.User
- func GetAuthnUserID(ctx context.Context) sdktypes.UserID
- func IsAuthnSystemUser(ctx context.Context) bool
- func ObjectWithOrgID[O interface{ ... }](ctx context.Context, o O) O
- func SetAuthnSystemUser(ctx context.Context) context.Context
- func SetAuthnUser(ctx context.Context, user sdktypes.User) context.Context
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAuthnInferredOrgID ¶ added in v0.12.1
Use this function to fill default org id for queries. In such queries we do not need to query for system users, but all users. If the user is not authenticated, it will return InvalidOrgID. If the user is a system user, it will return InvalidOrgID. Otherwise, will return the user's default org id.
func GetAuthnUser ¶
Get the authenticated user.
func GetAuthnUserID ¶ added in v0.8.6
Helper function.
func IsAuthnSystemUser ¶ added in v0.12.1
func ObjectWithOrgID ¶ added in v0.12.1
func ObjectWithOrgID[O interface { OrgID() sdktypes.OrgID WithOrgID(sdktypes.OrgID) O }](ctx context.Context, o O) O
If `o` has an owner, return unmodified. Otherwise, set the owner to the authenticated user.
func SetAuthnSystemUser ¶ added in v0.12.1
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.