525 | | A user that is a member of a circle that has the `MODIFY_EXPERIMENT` [wiki:SPIDoc#ExperimentPerimissions permission] on an experiment can add or remove aspects from that experiment. The operation to add aspects is `addExperimentAspects` in the `Experiments` service. Changing existing aspects is done through `changeExperimentAspects`. |
526 | | |
| 525 | A user that is a member of a circle that has the `MODIFY_EXPERIMENT` [wiki:SPIDocs#ExperimentPermissions permission] on an experiment can add or remove aspects from that experiment. The operation to add aspects is `addExperimentAspects` in the `Experiments` service. Changing existing aspects is done through `changeExperimentAspects`. |
| 526 | |
| 527 | The parameters to `addExperimentAspect` are arrays of the type, subtype, name and data block. Each of these are defined by the various aspects. The [LayoutAspect#LayoutCallstotheExperimentSPI layout aspect] defines one set of properties. In addition, adding one aspect may result in additional subaspects being added as well. The [LayoutAspect#LayoutCallstotheExperimentSPI layout aspect] does this as well. |
| 528 | |
| 529 | There is a default aspect implementation that simply copies the data block of the `addExperimentAspects` call and stores it. When an otherwise unknown aspect type is requested, this implemetation is called. The intent is that service developers can copy data in and out of experiment definitions by picking an aspect type name. |
| 530 | |
| 531 | The `changeExperimentAspects` takes the same list of type, sub-type, name, and data block tuples, but in this case the data block is an aspect-specific update language. The intention is to allow aspects to define update protocols. To replace an aspect a user can generally call `removeExperimentAspects` and then `addExperimentAspects` to replace the removed aspects. The [LayoutAspect#LayoutCallstotheExperimentSPI layout aspect] does not define a change protocol. The default aspect implementation simply copies the contents of the data block over the existing data (if any). |
| 532 | |
| 533 | |
| 534 | ==== Adding and Changing Experiment Access Control Lists ==== |
| 535 | |
| 536 | All experiment permissions are controlled by access control lists (ACL) that map circles to experiment permissions. The only exception to this is the owner of the experiment who always has all permissions. Any user who has `MODIFY_EXPERIMENT_ACCESS` permissions to an experiment can change its ACLs. |
| 537 | |
| 538 | A user can set the ACLs on `createExperiment` by providing a list of (circle, permissions) pairs, where permissions is itself a list of permissions. Any errors in specifying the ACLs will cause the creation to fail. |
| 539 | |
| 540 | A user can call `changeExperimentACL` with a list in the same format. New entries will be added, existing entries will be overwritten, and entries with an empty permission list will be removed. A partial success is possible and the result of each change is returned. |
| 541 | |
| 542 | |
| 543 | |
| 544 | |