Skip to content

Commit

Permalink
Merge pull request #1313 from ugent-library/fix_issue_1311
Browse files Browse the repository at this point in the history
fix issue 1311: add batch operation 'lock' and 'unlock'
  • Loading branch information
nics authored Nov 14, 2023
2 parents ceae24f + d17eacc commit a3de1e3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cli/backends.go
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,8 @@ func newRepo(personService backends.PersonService, organizationService backends.
"eissn.remove": mutate.EISSNRemove,
"external_fields.set": mutate.ExternalFieldsSet,
"status.set": mutate.StatusSet,
"lock": mutate.Lock,
"unlock": mutate.Unlock,
},
})

Expand Down
10 changes: 10 additions & 0 deletions mutate/publication.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,3 +235,13 @@ func StatusSet(p *models.Publication, args []string) error {
p.Status = args[0]
return nil
}

func Lock(p *models.Publication, args []string) error {
p.Locked = true
return nil
}

func Unlock(p *models.Publication, args []string) error {
p.Locked = false
return nil
}

0 comments on commit a3de1e3

Please sign in to comment.