Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-22 09:20:29 +01:00
Don't allow auto-updating of trust level
Dieser Commit ist enthalten in:
Ursprung
e056242269
Commit
d96ebb3bdd
2 geänderte Dateien mit 4 neuen und 3 gelöschten Zeilen
|
@ -84,13 +84,14 @@ export default Component.extend({
|
|||
content = content.filter(field => field.id !== controller.currentField.id);
|
||||
}
|
||||
|
||||
// updating usernames or emails via actions is not supported
|
||||
// updating certain user fields via the profile update action is not supported
|
||||
if (activeType === 'userField' &&
|
||||
this.options.context === 'action' &&
|
||||
this.inputType === 'association' &&
|
||||
this.selectorType === 'key') {
|
||||
|
||||
content = content.filter(userField => ['username','email'].indexOf(userField.id) === -1);
|
||||
const excludedFields = ['username','email', 'trust_level'];
|
||||
content = content.filter(userField => excludedFields.indexOf(userField.id) === -1);
|
||||
}
|
||||
|
||||
return content;
|
||||
|
|
|
@ -275,7 +275,7 @@ class CustomWizard::Action
|
|||
end
|
||||
|
||||
def profile_excluded_fields
|
||||
['username', 'email'].freeze
|
||||
['username', 'email', 'trust_level'].freeze
|
||||
end
|
||||
|
||||
def allowed_profile_fields
|
||||
|
|
Laden …
In neuem Issue referenzieren