hubzero / hubzero-cms

Platform for Scientific Collaboration
https://hubzero.org
GNU General Public License v2.0
47 stars 57 forks source link

[NCN-440] Update and integrate reply component: last revisions #1715

Closed jsperhac closed 3 months ago

jsperhac commented 4 months ago

These are some last (:crossed_fingers:) changes to the salesforce one-click work for core. See also https://github.com/hubzero/hubzero-cms/pull/1704.

Don't panic, it's mostly the README and the migrations!

Verify requested page exists

Here we restore the table jos_reply_pages so that we can verify that the user is requesting a real page. Randomly chosen page ids will now fail. At migration time, the table's expiration column is removed if it is found, and the table is populated with records that match the page and email subscription provided.

A very simple ORM model is also provided for the table.

Explicitly drop unused table

I've added an explicit migration that drops the jos_reply_access_codes table. It was used by the prior implementation, jos_reply, but is not used any longer, since I have removed validation from the page level, and user level validation is on the jos_users record.

Clean up unclear language

I've renamed the file that provides the email subscription page id, for clarity, and added it to the codebase. Previously we had an "example" file that had to be edited at install time. Since we provide the email subscription options page and the user survey page, let's just supply the correct page id too.

Motivation

Jira NCN-440 and friends.

Testing

Performed on AWS instance of jsperhac, checked valid and invalid page accesses. Ran debugger to verify.

Checklist