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

« back to all changes in this revision

Viewing changes to src/github.com/juju/juju/apiserver/controller/destroy.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:
8
8
 
9
9
        "github.com/juju/juju/apiserver/common"
10
10
        "github.com/juju/juju/apiserver/params"
11
 
        "github.com/juju/juju/core/description"
 
11
        "github.com/juju/juju/permission"
12
12
)
13
13
 
14
14
// DestroyController will attempt to destroy the controller. If the args
21
21
// that it should wait for hosted models to be completely cleaned up
22
22
// before proceeding.
23
23
func (s *ControllerAPI) DestroyController(args params.DestroyControllerArgs) error {
24
 
        hasPermission, err := s.authorizer.HasPermission(description.SuperuserAccess, s.state.ControllerTag())
 
24
        hasPermission, err := s.authorizer.HasPermission(permission.SuperuserAccess, s.state.ControllerTag())
25
25
        if err != nil {
26
26
                return errors.Trace(err)
27
27
        }