Documentation ¶
Index ¶
- Constants
- func GetAnswerPermission(ctx context.Context, userID string, creatorUserID string, ...) (actions []*schema.PermissionMemberAction)
- func GetCommentPermission(ctx context.Context, userID string, creatorUserID string, ...) (actions []*schema.PermissionMemberAction)
- func GetQuestionPermission(ctx context.Context, userID string, creatorUserID string, ...) (actions []*schema.PermissionMemberAction)
- func GetTagPermission(ctx context.Context, canEdit, canDelete bool) (actions []*schema.PermissionMemberAction)
- func GetTagSynonymPermission(ctx context.Context, canEdit bool) (actions []*schema.PermissionMemberAction)
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.
Click to show internal directories.
Click to hide internal directories.