rule

package
v0.11.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 28, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

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

func FilterTeamRule() privacy.QueryRule

FilterTeamRule is a query rule that filters out tasks and users that are not in the team.

func FilterUsesDep added in v0.11.0

func FilterUsesDep() privacy.QueryRule

FilterUsesDep is a filter query rule that uses its injected dependency using type-assertion.

func LogTaskMutationHook

func LogTaskMutationHook() ent.Hook

LogTaskMutationHook returns a hook logging planet mutations.

func SetMutationLogFunc

func SetMutationLogFunc(f func(string, ...any)) func(string, ...any)

SetMutationLogFunc overrides the logging function used by LogPlanetMutationHook.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL