mirror of https://gitee.com/answerdev/answer.git
fix: Initializes the comment permission list
This commit is contained in:
parent
ceb0ee48c6
commit
dd5671d5f9
|
@ -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",
|
||||||
|
|
Loading…
Reference in New Issue