Documentation ¶
Overview ¶
Package hooks is middleware to alter the graphql mutation
Index ¶
- Variables
- func HookDeleteUser() ent.Hook
- func HookEmailVerificationToken() ent.Hook
- func HookGroup() ent.Hook
- func HookGroupAuthz() ent.Hook
- func HookGroupMembersAuthz() ent.Hook
- func HookOrgMembers() ent.Hook
- func HookOrgMembersAuthz() ent.Hook
- func HookOrganization() ent.Hook
- func HookPasswordResetToken() ent.Hook
- func HookPersonalAccessToken() ent.Hook
- func HookUser() ent.Hook
Constants ¶
This section is empty.
Variables ¶
var ( // ErrInternalServerError is returned when an internal error occurs. ErrInternalServerError = errors.New("internal server error") // ErrPersonalOrgsNoChildren is returned when personal org attempts to add a child org ErrPersonalOrgsNoChildren = errors.New("personal organizations are not allowed to have child organizations") // ErrPersonalOrgsNoMembers is returned when personal org attempts to add members ErrPersonalOrgsNoMembers = errors.New("personal organizations are not allowed to have members other than the owner") // ErrPersonalOrgsNoUser is returned when personal org has no user associated, so no permissions can be added ErrPersonalOrgsNoUser = errors.New("personal organizations missing user association") // ErrUnsupportedFGARole is returned when a role is assigned that is not supported in our fine grained authorization system ErrUnsupportedFGARole = errors.New("unsupported role") // ErrMissingRole is returned when an update request is made that contains no role ErrMissingRole = errors.New("missing role in update") )
Functions ¶
func HookDeleteUser ¶ added in v0.2.5
HookDeleteUser runs on user deletions to clean up personal organizations
func HookEmailVerificationToken ¶ added in v0.2.2
HookEmailVerificationToken runs on accesstoken mutations and sets expires
func HookGroupAuthz ¶
HookGroupAuthz runs on group mutations to setup or remove relationship tuples
func HookGroupMembersAuthz ¶ added in v0.2.5
HookGroupMembersAuthz runs on group member mutations to setup or remove relationship tuples
func HookOrgMembers ¶ added in v0.2.5
func HookOrgMembersAuthz ¶ added in v0.2.5
HookOrgMembersAuthz runs on organization member mutations to setup or remove relationship tuples
func HookOrganization ¶
HookOrganization runs on org mutations to set default values that are not provided
func HookPasswordResetToken ¶ added in v0.2.3
HookPasswordResetToken runs on reset token mutations and sets expires
func HookPersonalAccessToken ¶
HookPersonalAccessToken runs on accesstoken mutations and sets expires
Types ¶
This section is empty.