Details

    • Type: Improvement
    • Status: Deployed
    • Priority: Medium
    • Resolution: DeployedToBeta
    • Affects Version/s: 0.9.168
    • Fix Version/s: 0.9.173
    • Milestone:
      Internal 0.9
    • Difficulty:
      Medium
    • Roadmap:
      Collection
    • Components:
      BackEnd

      Description

      Brakeman says:
      CollectionsController
      create
      Unprotected mass assignment near line 99: Collection.new(params[:collection])

      CollectionsController
      update
      Unprotected mass assignment near line 125: Collection.find_by_name(params[:collection_id]).update_att...

      CollectionsController
      create
      Unprotected mass assignment near line 107: Collection.new(params[:collection]).collection_participant...

      How to test:
      Has 87% test coverage.

      Two of these warnings have to do with creating a collection, and the other has to do with editing it, so we'll want to make sure there are no unexpected errors when we create a collection with various combinations of fields (e.g. only required fields, all required fields, some combination of both) filled in, and then edit it to add, remove, or change information:
      1. Log in
      2. Browse > Collection > New Collection
      3. Fill in the form as desired
      4. Press "Submit"
      5. Follow "Collection Settings" link in side bar
      6. Edit some fields
      7. Press "Update"

      One of these mass assignment warnings relates to how we create the collection owner when someone makes a new collection, so if we might want to try creating a collection as a user with:
      A. no pseuds (other than the default/fallback)
      B. multiple pseuds who selects just one in the "Owner pseud(s)" field
      C. multiple pseuds who selects two or more in the "Owner pseud(s)" field
      D. multple pseuds who selects no pseuds in the "Owner pseud(s)" field

        Attachments

          Activity

            People

            • Assignee:
              kamilogorek Kamil Ogórek (Inactive)
              Reporter:
              sarken sarken
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: