forked from aces/Loris
-
Notifications
You must be signed in to change notification settings - Fork 0
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
2018 01 17 tara perm roles #60
Open
ridz1208
wants to merge
227
commits into
taracampbell:permission_roles
Choose a base branch
from
ridz1208:2018_01_17_tara_perm_roles
base: permission_roles
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
2018 01 17 tara perm roles #60
ridz1208
wants to merge
227
commits into
taracampbell:permission_roles
from
ridz1208:2018_01_17_tara_perm_roles
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
This updates the function signature of NDB_BVL_Instrument to fix PHP warnings introduced by aces#2812. Developers of instruments should update their own code accordingly, to ensure they don't generate their own errors about mismatched signature types.
…s#2941) This allows post data to be automatically resent after a redirect by changing the HTTP response code from 301 to 307.
Update some calls to Utility::nullifyEmpty to use the return value in order to make it possible to later update to pass-by-value and not depend on (documented) side-effects of the function call.
Password resets use the username to send the password reset email, but the front-end prompts for an email. This fixes the text in the frontend.
Update mt_rand to use random_int when generating temporary passwords. From the PHP manual regarding mt_rand: Caution This function does not generate cryptographically secure values, and should not be used for cryptographic purposes. If you need a cryptographically secure value, consider using random_int(), random_bytes(), or openssl_random_pseudo_bytes() instead.
Show / Hide mri-protocol table functionality was not doing anything. This re-adds the mri-protocol id to the table and calls the show / hide functions on the parent element to get rid of dynamic table artifacts. See: https://redmine.cbrain.mcgill.ca/issues/8830
Old LORIS instances used a hardcoded dataDumps directory with an .htaccess file to protect it, but LORIS is currently treating the directory as a module, even if it exists. This adds an exception so that those projects can still access their old excel dumps, but should not affect new LORIS instances.
The NDB_BVL_Feedback class incorrectly had a isset check instead of an !empty check to determine if an SQL query returned any results. isset would never be false, because the variable is set directly above the check. This updates it to be !empty, so that "null" is properly returned when there is no feedback.
…s#3168) Properly escape table and column names in tools/DB_date_zeros_removal.php script.
…ry_builder.php (aces#3053) TestPlan for this module should include testing of related tool scripts.
This fixes the error: "Deprecated: Non-static method User::isPasswordStrong() should not be called statically in /var/www/loris/php/libraries/SinglePointLogin.class.inc on line 201" when resetting a password. `git grep isPasswordStrong` shows that all calls to User::isPasswordStrong are already made statically, so only the function signature needs to be updated.
This slashes at the end of the password-reset and request-account links on the login page, in order to prevent an unnecessary redirect to the URL with a slash at the end. This was also causing conflicts with some nginx reverse-proxy configurations.
Fix Heroku password generation. It was referencing the wrong (old) column name, which no longer exists.
The MySQL string comparison in SinglePointLogin was authenticating in a case-insensitive manner, resulting in various places in the code failing if they tried to compare $_SESSION['State']->getUsername() (which has the value from when the user logged in) with User::singleton()->getUsername() (which has the value from the database) in PHP (which, unlike MySQL, *is* case sensitive.) This updates the SinglePointLogin class so that it uses the username from the database, rather than the HTTP request for the username in $_SESSION['State'].
In LorisForm, the array key for any numeric field name was getting mangled to "0" by the array_merge function, causing the saving and validation to fail. This replaces array_merge with "+" to ensure that the keys do not get changed in the submit values.
This makes Travis immediately fail if it fails a linting test, rather than waiting for the fully integration test suite to run before indicating failure. This should speed up our CI process, since currently Travis is waiting for a backlog of builds (which mostly fail PHPCS) to finish before starting new builds.
…capital P (aces#3182) Fix case in variable name.
LorisForm was determining if a value is supplied by using the empty() function, which means that 0 was not considered a submitted value. This changes it to be more specific about what values it checks and only denies null or the empty string.
I was getting an error about converting arrays to strings on the dashboard, because a query which returns no results return an empty array. This changes the check from !== null to !empty() to fix this error.
Fix bug where CouchDB MRI import script was not working with MySQL and strict group by mode.
…e statuses (aces#3150) When retrieving the list of MRI's, _getFileList will only append files which already exist in the incoming data directory. However these files get deleted when the MRI pipeline runs successfully, allowing for duplicate uploads for previously successful files. It can be assumed that the insertion was successful based on the number of MINCs inserted being > 0. Use this in addition to file existence to generate the mriList which gets checked when an upload form is submitted.
…es (aces#3016) This removes redundant code checking config files and client initialization. It is redundant because these lines of codes don't affect functionality. Attempts to download files, whether logged in or not, function in the same way whether these lines of code are present or not. Successful download if logged in, 401 status code otherwise. However, the presence of $client->initialize("../project/config.xml"); causes a PHP Notice when a session already exists everytime a file is downloaded. This code is copy-pasted widely across LORIS and it is likely worth reviewing to see if it adds any functionality.
This updates the next_stage module to the "modern", non-deprecated module format.
…where (aces#2977) Help Editor is not Final Radiological Review
This moves 2 static functions from the candidate_parameters class to the candidate class since they're used across different modules.
…ces#3017) The ajax script was duplicating code that was already run from AjaxHelper.php, so is removed.
…ces#3195) The function call was inside of a string literal, and being interpreted as a string.
…ces#3460) This fixes the link in the dashboard "incomplete tests" section.
This removes the last DB->select by changing them to pselect which use prepared statements. Cleans the "PHP Warning: Missing argument 2 for Database::select()" message in the error log.
…aces#3374) This updates the configuration module readme.md to follow the template for module specifications set by the imaging_browser README. (It also renames the file to README.md to be more consistent.) The "How to use this module" part of the existing readmd was moved to markdown help content with slight modification, while the "How to upgrade from config.xml" which was relevant for the LORIS 14.12 release was removed as it's no longer relevant.
Add README to next_stage module.
Add README for examiner module which defines the specifications in the standard format.
Add a language selector field for media uploads.
This adds a check for Active candidate in the survey query.
This modifies the way the mysqldump is called in cleanup_mri_tables_for_19-0_release.php. Instead of using the username and password from the config.xml file, it prompts the user running the script to enter the MySQL username and password to use for mysqldump. The user in the config file does not always have sufficient permissions.
This adds a README/spec for the data team helper module, following the format of other modules.
This runs the LORIS test suite under docker to fixes Travis failures out of our control.
This add modernizer and polyfill libraries for datepicker to be used by browsers like Safari in surveys.
This corrects the name of the config setting referring to the couchDB databases in the config.xml. This name was changed from database to dbName to be differentiated from the MySQL database credentials and was accidentally reverted in 8b09f59.
This makes the Travis testing on minor in sync with the major branch, although PHP 7.2 is not tested because the fixes are currently only in major.
Fix Travis to run on both PHP 7.0 and 7.1 again.
This adds an endpoint to provide image file links. It support a single GET parameter: "?since=", which takes a date as a parameter and returns the images since that date.
Update VERSION file to 19.0.0.
ridz1208
force-pushed
the
2018_01_17_tara_perm_roles
branch
from
February 23, 2018 00:15
c30c73a
to
029badd
Compare
smarter Update Database.class.inc new function renamed
major changes to the script Major changes Everything works first of many renamed renamed
ridz1208
force-pushed
the
2018_01_17_tara_perm_roles
branch
from
February 23, 2018 00:53
029badd
to
1693592
Compare
ridz1208
force-pushed
the
2018_01_17_tara_perm_roles
branch
3 times, most recently
from
March 1, 2018 19:29
085f53e
to
32b46e0
Compare
ridz1208
force-pushed
the
2018_01_17_tara_perm_roles
branch
from
March 1, 2018 21:46
32b46e0
to
364e80d
Compare
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.
@Tara I made this PR just to point you towards my branch of changes implemented on top of yours. This branch was rebased on top of 19.0 since soon 19.0 will be pushed to bugfix,minor and major so this is taking some advance on it. (to see clear changes do a git compare with aces/19.0-dev)
non-roles-related changes
roles-related changes:
changes are not yet done....
Compare to 19.0
https://github.com/aces/Loris/compare/19.0-dev...ridz1208:2018_01_17_tara_perm_roles?expand=1