Documentation ¶
Index ¶
- func AllowIfAdmin() privacy.QueryMutationRule
- func AllowIfViewerInTheSameTeam() privacy.MutationRule
- func AllowTaskCreateIfOwner() privacy.MutationRule
- func AllowUserCreateIfAdmin() privacy.MutationRule
- func DenyIfNoViewer() privacy.QueryMutationRule
- func DenyIfNotAdmin() privacy.QueryMutationRule
- func DenyIfStatusChangedByOther() privacy.MutationRule
- func DenyUpdateRule() privacy.MutationRule
- func FilterTeamRule() privacy.QueryRule
- func FilterUsesDep() privacy.QueryRule
- func LogTaskMutationHook() ent.Hook
- func SetMutationLogFunc(f func(string, ...any)) func(string, ...any)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllowIfAdmin ¶
func AllowIfAdmin() privacy.QueryMutationRule
AllowIfAdmin is a rule that returns allow decision if the viewer is admin.
func AllowIfViewerInTheSameTeam ¶
func AllowIfViewerInTheSameTeam() privacy.MutationRule
AllowIfViewerInTheSameTeam returns allow decision if viewer on the same team as the task.
func AllowTaskCreateIfOwner ¶
func AllowTaskCreateIfOwner() privacy.MutationRule
AllowTaskCreateIfOwner is a rule that allows creating task only if the creator is also the user.
func AllowUserCreateIfAdmin ¶
func AllowUserCreateIfAdmin() privacy.MutationRule
AllowUserCreateIfAdmin is a rule that allows user creation only if the viewer is admin.
func DenyIfNoViewer ¶
func DenyIfNoViewer() privacy.QueryMutationRule
DenyIfNoViewer is a rule that returns deny decision if the viewer is missing in the context.
func DenyIfNotAdmin ¶
func DenyIfNotAdmin() privacy.QueryMutationRule
DenyIfNotAdmin is a rule that returns deny decision if the viewer not admin.
func DenyIfStatusChangedByOther ¶
func DenyIfStatusChangedByOther() privacy.MutationRule
DenyIfStatusChangedByOther is a mutation rule that returns a deny decision if the task status was changed by someone that is not the owner of the task, or an admin.
func DenyUpdateRule ¶
func DenyUpdateRule() privacy.MutationRule
DenyUpdateRule is a mutation rule that denies the update-many operation.
func FilterTeamRule ¶
FilterTeamRule is a query rule that filters out tasks and users that are not in the team.
func FilterUsesDep ¶ added in v0.11.0
FilterUsesDep is a filter query rule that uses its injected dependency using type-assertion.
func LogTaskMutationHook ¶
LogTaskMutationHook returns a hook logging planet mutations.
Types ¶
This section is empty.