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

« back to all changes in this revision

Viewing changes to src/github.com/juju/juju/apiserver/sshclient/facade.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:
7
7
 
8
8
import (
9
9
        "github.com/juju/errors"
 
10
 
10
11
        "github.com/juju/juju/apiserver/common"
11
12
        "github.com/juju/juju/apiserver/facade"
12
13
        "github.com/juju/juju/apiserver/params"
13
 
        "github.com/juju/juju/core/description"
14
14
        "github.com/juju/juju/network"
 
15
        "github.com/juju/juju/permission"
15
16
)
16
17
 
17
18
func init() {
33
34
}
34
35
 
35
36
func (facade *Facade) checkIsModelAdmin() error {
36
 
        isModelAdmin, err := facade.authorizer.HasPermission(description.AdminAccess, facade.backend.ModelTag())
 
37
        isModelAdmin, err := facade.authorizer.HasPermission(permission.AdminAccess, facade.backend.ModelTag())
37
38
        if err != nil {
38
39
                return errors.Trace(err)
39
40
        }