[Create] Clarify function naming
Per review feedback, https://github.com/nasa/openmctweb/pull/666#discussion_r52625960
This commit is contained in:
@@ -83,7 +83,9 @@ define(
|
|||||||
CopyService.prototype.perform = function (domainObject, parent, filter) {
|
CopyService.prototype.perform = function (domainObject, parent, filter) {
|
||||||
var policyService = this.policyService;
|
var policyService = this.policyService;
|
||||||
|
|
||||||
function completeFilter(domainObject) {
|
// Combines caller-provided filter (if any) with the
|
||||||
|
// baseline behavior of respecting creation policy.
|
||||||
|
function filterWithPolicy(domainObject) {
|
||||||
return (!filter || filter(domainObject)) &&
|
return (!filter || filter(domainObject)) &&
|
||||||
policyService.allow(
|
policyService.allow(
|
||||||
"creation",
|
"creation",
|
||||||
@@ -95,7 +97,7 @@ define(
|
|||||||
return new CopyTask(
|
return new CopyTask(
|
||||||
domainObject,
|
domainObject,
|
||||||
parent,
|
parent,
|
||||||
completeFilter,
|
filterWithPolicy,
|
||||||
this.$q
|
this.$q
|
||||||
).perform();
|
).perform();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user