Factor out the check for whether name changes are disabled

(imported from commit 56ddd9cf53ec49e2e096abe82ed44f758912272e)
This commit is contained in:
Zev Benjamin
2014-03-27 18:50:37 -04:00
parent 8518801601
commit 9114715030
2 changed files with 11 additions and 22 deletions

View File

@@ -444,16 +444,7 @@ exports.setup_page = function () {
avatar.build_user_avatar_widget(upload_avatar);
if (page_params.domain === "users.customer4.invalid" ||
page_params.name_changes_disabled) {
// At the request of the facilitators, CUSTOMER4 users
// can't change their names, so don't show that as a settings
// option. This is also disabled through the JSON UI. Once we
// have the infrastructure for administrative policies, we can
// handle this more gracefully.
//
// Additionally, if this install has disabled name changes, hide the
// container
if (page_params.name_changes_disabled) {
$("#name_change_container").hide();
}