-
Notifications
You must be signed in to change notification settings - Fork 69
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
Disallow Updating of Federated User's Passwords #444
Disallow Updating of Federated User's Passwords #444
Conversation
classes/XDUser.php
Outdated
@@ -544,9 +544,11 @@ public static function getUserByID($uid, &$targetInstance = NULL) | |||
|
|||
public function setPassword($raw_password) | |||
{ | |||
if ($this->getUserType() === FEDERATED_USER_TYPE){ | |||
throw new Exception("Permission Denied. Only local accounts may have their passwords modified."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This message does not imply what the condition is checking.
"Federated users are not allow to have their passwords modified."
would probably be better :)
listeners: { | ||
blur: XDMoD.utils.trimOnBlur, | ||
focus: removeFieldHighlight, | ||
invalid: function (thisField/* , msg */) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either remove the commented code or pass the parameter since it is in the function spec.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leave function arguments:
ubccr/xdmod-qa@ff9ae2e
msgTarget: 'under', | ||
submitValue: false, | ||
|
||
validator: function (/* value */) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either remove the commented code or pass the parameter since it is in the function spec.
var decodedSuccess; | ||
if (success) { | ||
data = CCR.safelyDecodeJSONResponse(response); | ||
decodedSuccess = CCR.checkDecodedJSONResponseSuccess(data); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpicky, but shouldn't this be named "decodedSuccessResponse"?
After talking with smgallo, we have decided to update the linting rules (ubccr/xdmod-qa@ff9ae2e) to allow unused function arguments. These should stay in |
classes/XDUser.php
Outdated
@@ -544,9 +545,11 @@ public static function getUserByID($uid, &$targetInstance = NULL) | |||
|
|||
public function setPassword($raw_password) | |||
{ | |||
if ($this->getUserType() === FEDERATED_USER_TYPE){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a space between closing parens and left brace.
Description
As above.
Old:
![screenshot from 2018-02-26 09-40-28](https://user-images.githubusercontent.com/2617780/36676561-023fc628-1ada-11e8-86b3-87236716deab.png)
New:
![screenshot from 2018-02-26 09-46-05](https://user-images.githubusercontent.com/2617780/36676571-0812a08e-1ada-11e8-8c14-eee3a02dad3a.png)
Motivation and Context
Ben's comments on testing.
Tests performed
Yeah.
Types of changes
Checklist: