~juju-qa/ubuntu/xenial/juju/2.0-rc2

« back to all changes in this revision

Viewing changes to src/github.com/juju/juju/apiserver/action/run.go

  • Committer: Nicholas Skaggs
  • Date: 2016-09-30 14:39:30 UTC
  • mfrom: (1.8.1)
  • Revision ID: nicholas.skaggs@canonical.com-20160930143930-vwwhrefh6ftckccy
import upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
// Run the commands specified on the machines identified through the
45
45
// list of machines, units and services.
46
46
func (a *ActionAPI) Run(run params.RunParams) (results params.ActionResults, err error) {
47
 
        if err := a.checkCanWrite(); err != nil {
 
47
        if err := a.checkCanAdmin(); err != nil {
48
48
                return results, err
49
49
        }
50
50
        if err := a.check.ChangeAllowed(); err != nil {
71
71
 
72
72
// RunOnAllMachines attempts to run the specified command on all the machines.
73
73
func (a *ActionAPI) RunOnAllMachines(run params.RunParams) (results params.ActionResults, err error) {
74
 
        if err := a.checkCanWrite(); err != nil {
 
74
        if err := a.checkCanAdmin(); err != nil {
75
75
                return results, err
76
76
        }
77
77