sdk icon indicating copy to clipboard operation
sdk copied to clipboard

SM-837: Add Secret and Project Length Restrictions

Open coltonhurst opened this issue 1 year ago • 3 comments

Type of change

- [ ] Bug fix
- [x] New feature development
- [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc)
- [ ] Build/deploy pipeline (DevOps)
- [ ] Other

Objective

Add Secret and Project length restrictions for each field:

  • project_name <= 500
  • secret_key <= 500
  • secret_value <= 3000
  • secret_note <= 7000

Code changes

  • error.rs: Add the FieldLengthExceeded error
  • project/create.rs: Add and call the validate function
  • project/mod.rs: Add the project_name max const
  • project/update.rs: Add and call the validate function
  • secret/create.rs: Add and call the validate function
  • secret/mod.rs: Add the secret key, value, and note max const's
  • secret/update.rs: Add and call the validate function

Before you submit

  • Please add unit tests where it makes sense to do so (encouraged but not required)

coltonhurst avatar Jul 12 '23 13:07 coltonhurst