0
0
Fork 1
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:
Angus McLeod 2020-04-14 20:46:53 +10:00
Ursprung e056242269
Commit d96ebb3bdd
2 geänderte Dateien mit 4 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -84,13 +84,14 @@ export default Component.extend({
content = content.filter(field => field.id !== controller.currentField.id); 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' && if (activeType === 'userField' &&
this.options.context === 'action' && this.options.context === 'action' &&
this.inputType === 'association' && this.inputType === 'association' &&
this.selectorType === 'key') { 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; return content;

Datei anzeigen

@ -275,7 +275,7 @@ class CustomWizard::Action
end end
def profile_excluded_fields def profile_excluded_fields
['username', 'email'].freeze ['username', 'email', 'trust_level'].freeze
end end
def allowed_profile_fields def allowed_profile_fields