mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Separation of writable update from field load method
This commit is contained in:
committed by
Endi S. Dewata
parent
e271e80f7d
commit
6e3a21a115
@@ -187,6 +187,13 @@ IPA.field = function(spec) {
|
||||
that.values = [''];
|
||||
}
|
||||
|
||||
that.load_writable(record);
|
||||
|
||||
that.reset();
|
||||
};
|
||||
|
||||
that.load_writable = function(record) {
|
||||
|
||||
that.writable = true;
|
||||
|
||||
if (that.metadata) {
|
||||
@@ -199,14 +206,12 @@ IPA.field = function(spec) {
|
||||
}
|
||||
}
|
||||
|
||||
if (that.record.attributelevelrights) {
|
||||
var rights = that.record.attributelevelrights[that.name];
|
||||
if (record.attributelevelrights) {
|
||||
var rights = record.attributelevelrights[that.name];
|
||||
if (!rights || rights.indexOf('w') < 0) {
|
||||
that.writable = false;
|
||||
}
|
||||
}
|
||||
|
||||
that.reset();
|
||||
};
|
||||
|
||||
that.reset = function() {
|
||||
|
||||
Reference in New Issue
Block a user