permission

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AdminAccess               = "admin.access"
	QuestionAdd               = "question.add"
	QuestionEdit              = "question.edit"
	QuestionEditWithoutReview = "question.edit_without_review"
	QuestionDelete            = "question.delete"
	QuestionClose             = "question.close"
	QuestionReopen            = "question.reopen"
	QuestionVoteUp            = "question.vote_up"
	QuestionVoteDown          = "question.vote_down"
	AnswerAdd                 = "answer.add"
	AnswerEdit                = "answer.edit"
	AnswerEditWithoutReview   = "answer.edit_without_review"
	AnswerDelete              = "answer.delete"
	AnswerAccept              = "answer.accept"
	AnswerVoteUp              = "answer.vote_up"
	AnswerVoteDown            = "answer.vote_down"
	CommentAdd                = "comment.add"
	CommentEdit               = "comment.edit"
	CommentDelete             = "comment.delete"
	CommentVoteUp             = "comment.vote_up"
	CommentVoteDown           = "comment.vote_down"
	ReportAdd                 = "report.add"
	TagAdd                    = "tag.add"
	TagEdit                   = "tag.edit"
	TagEditSlugName           = "tag.edit_slug_name"
	TagEditWithoutReview      = "tag.edit_without_review"
	TagDelete                 = "tag.delete"
	TagSynonym                = "tag.synonym"
	LinkUrlLimit              = "link.url_limit"
	VoteDetail                = "vote.detail"
	AnswerAudit               = "answer.audit"
	QuestionAudit             = "question.audit"
	TagAudit                  = "tag.audit"
	TagUseReservedTag         = "tag.use_reserved_tag"
)

Variables

This section is empty.

Functions

func GetAnswerPermission

func GetAnswerPermission(ctx context.Context, userID string, creatorUserID string, canEdit, canDelete bool) (
	actions []*schema.PermissionMemberAction)

GetAnswerPermission get answer permission

func GetCommentPermission

func GetCommentPermission(ctx context.Context, userID string, creatorUserID string, canEdit, canDelete bool) (
	actions []*schema.PermissionMemberAction)

GetCommentPermission get comment permission

func GetQuestionPermission

func GetQuestionPermission(ctx context.Context, userID string, creatorUserID string,
	canEdit, canDelete, canClose, canReopen bool) (
	actions []*schema.PermissionMemberAction)

GetQuestionPermission get question permission

func GetTagPermission

func GetTagPermission(ctx context.Context, canEdit, canDelete bool) (
	actions []*schema.PermissionMemberAction)

GetTagPermission get tag permission

func GetTagSynonymPermission added in v0.5.0

func GetTagSynonymPermission(ctx context.Context, canEdit bool) (
	actions []*schema.PermissionMemberAction)

GetTagSynonymPermission get tag synonym permission

Types

This section is empty.

Jump to

Keyboard shortcuts

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