diff options
author | Petr Vobornik <pvoborni@redhat.com> | 2013-02-18 13:44:07 +0100 |
---|---|---|
committer | Petr Vobornik <pvoborni@redhat.com> | 2013-03-18 14:33:46 +0100 |
commit | c07bd84cfd4ae471bd72020d78bdd3c07b7a08b5 (patch) | |
tree | 69e2f565edef818d813be2c7ab18fd6b3a56e5ff | |
parent | 44db916419e4c0358ef6892223edaf9eaa77f051 (diff) | |
download | freeipa.git-c07bd84cfd4ae471bd72020d78bdd3c07b7a08b5.tar.gz freeipa.git-c07bd84cfd4ae471bd72020d78bdd3c07b7a08b5.tar.xz freeipa.git-c07bd84cfd4ae471bd72020d78bdd3c07b7a08b5.zip |
Fix handling of no_update flag in Web UI
There was an incorrect check for no_update flag. Check was performed as
if the flag was an attribute of object not an item of array. Hence, the
flag never caused any effect.
-rw-r--r-- | install/ui/src/freeipa/field.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/install/ui/src/freeipa/field.js b/install/ui/src/freeipa/field.js index c549a000..f705ef7b 100644 --- a/install/ui/src/freeipa/field.js +++ b/install/ui/src/freeipa/field.js @@ -21,7 +21,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -define(['./ipa', './jquery'], function(IPA, $) { +define(['dojo/_base/array', './ipa', './jquery'], function(array, IPA, $) { IPA.field = function(spec) { spec = spec || {}; @@ -182,7 +182,7 @@ IPA.field = function(spec) { that.writable = false; } - if (that.metadata.flags && 'no_update' in that.metadata.flags) { + if (that.metadata.flags && array.indexOf(that.metadata.flags, 'no_update') > -1) { that.writable = false; } } |