New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactoring: web guest vs admin separation #60
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- tests were migrated also - special variable for P::S object to avoid initialization (simplifies testing) Another change in the vein of pf::web vs pf::web::admin split. ~#1485
Additionally * generate_registration_page no longer requires a redundant $post_uri parameter that was pushed as a URL constant instead * introduced _init_i18n that regroups the i18n stuff done in every generate... method (will be used as we migrate subs) * pf::web::admin's render_template insert pf::web::constants for template consumption
* valid_access_duration * valid_arrival_date * validate_registration -> validate_guest_creation * validate_registration_multiple -> validate_guest_creation_multiple * validate_registration_import -> validate_guest_import * preregister -> create_guest * preregister_multiple -> create_guest_multiple * generate_registration_confirmation_page -> generate_guestcreation_confirmation_page * import_csv
Avoided API changes by splitting subs into admin specific subs at the cost of code duplication. http://packetfence.org/bugs/view.php?id=1518 (cherry picked from commit 5200af3) Conflicts: lib/pf/web/guest.pm
* generate_admin_login_page -> generate_login_page * manager_authenticate -> authenticate
Looks fine. That's a very appreciated aggregation. Let's merge! |
Lots of nice modifications. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
$portalSession's stuff is only relevant on the captive portal facing scenario. This refactoring splits out client facing and admin facing code so mistakes are harder to make. It also provides render_template(), it's own template directory, regrouped i18n and a stash-like template variables approach just like on the portalSession side.
A commit per commit review is probably the easiest way to review since there's a lot of code movement in there.
Fixes #1485: pf::web::guest / admin guest creation need some kind of separation
Ready for integration and code review.
Aimed at devel branch.