fix: Initializes the comment permission list

This commit is contained in:
LinkinStar 2022-11-25 17:08:55 +08:00
parent ceb0ee48c6
commit dd5671d5f9
1 changed files with 1 additions and 0 deletions

View File

@ -38,6 +38,7 @@ func GetCommentPermission(ctx context.Context, userID string, creatorUserID stri
// GetTagPermission get tag permission // GetTagPermission get tag permission
func GetTagPermission(ctx context.Context, canEdit, canDelete bool) ( func GetTagPermission(ctx context.Context, canEdit, canDelete bool) (
actions []*schema.PermissionMemberAction) { actions []*schema.PermissionMemberAction) {
actions = make([]*schema.PermissionMemberAction, 0)
if canEdit { if canEdit {
actions = append(actions, &schema.PermissionMemberAction{ actions = append(actions, &schema.PermissionMemberAction{
Action: "edit", Action: "edit",