rule

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

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

func FilterTeamRule() privacy.QueryRule

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

func LogTaskMutationHook added in v0.5.0

func LogTaskMutationHook() ent.Hook

LogPlanetMutationHook returns a hook logging planet mutations.

func SetMutationLogFunc

func SetMutationLogFunc(f func(string, ...interface{})) func(string, ...interface{})

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