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 LogTaskMutationHook() ent.Hook
- func SetMutationLogFunc(f func(string, ...interface{})) func(string, ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllowIfAdmin ¶ added in v0.5.0
func AllowIfAdmin() privacy.QueryMutationRule
AllowIfAdmin is a rule that returns allow decision if the viewer is admin.
func AllowIfViewerInTheSameTeam ¶ added in v0.5.0
func AllowIfViewerInTheSameTeam() privacy.MutationRule
AllowIfViewerInTheSameTeam returns allow decision if viewer on the same team as the task.
func AllowTaskCreateIfOwner ¶ added in v0.5.0
func AllowTaskCreateIfOwner() privacy.MutationRule
AllowTaskCreateIfOwner is a rule that allows creating task only if the creator is also the user.
func AllowUserCreateIfAdmin ¶ added in v0.5.0
func AllowUserCreateIfAdmin() privacy.MutationRule
AllowUserCreateIfAdmin is a rule that allows user creation only if the viewer is admin.
func DenyIfNoViewer ¶ added in v0.5.0
func DenyIfNoViewer() privacy.QueryMutationRule
DenyIfNoViewer is a rule that returns deny decision if the viewer is missing in the context.
func DenyIfNotAdmin ¶ added in v0.5.0
func DenyIfNotAdmin() privacy.QueryMutationRule
DenyIfNotAdmin is a rule that returns deny decision if the viewer not admin.
func DenyIfStatusChangedByOther ¶ added in v0.5.0
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 ¶ added in v0.5.0
FilterTeamRule is a query rule that filters out tasks and users that are not in the team.
func LogTaskMutationHook ¶ added in v0.5.0
LogPlanetMutationHook returns a hook logging planet mutations.
func SetMutationLogFunc ¶
SetMutationLogFunc overrides the logging function used by LogPlanetMutationHook.
Types ¶
This section is empty.