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

« back to all changes in this revision

Viewing changes to src/github.com/juju/juju/apiserver/root.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:
14
14
        "github.com/juju/juju/apiserver/common"
15
15
        "github.com/juju/juju/apiserver/facade"
16
16
        "github.com/juju/juju/apiserver/params"
17
 
        "github.com/juju/juju/core/description"
 
17
        "github.com/juju/juju/permission"
18
18
        "github.com/juju/juju/rpc"
19
19
        "github.com/juju/juju/rpc/rpcreflect"
20
20
        "github.com/juju/juju/state"
359
359
}
360
360
 
361
361
// HasPermission returns true if the logged in user can perform <operation> on <target>.
362
 
func (r *apiHandler) HasPermission(operation description.Access, target names.Tag) (bool, error) {
 
362
func (r *apiHandler) HasPermission(operation permission.Access, target names.Tag) (bool, error) {
363
363
        return common.HasPermission(r.state.UserAccess, r.entity.Tag(), operation, target)
364
364
}
365
365
 
366
366
// UserHasPermission returns true if the passed in user can perform <operation> on <target>.
367
 
func (r *apiHandler) UserHasPermission(user names.UserTag, operation description.Access, target names.Tag) (bool, error) {
 
367
func (r *apiHandler) UserHasPermission(user names.UserTag, operation permission.Access, target names.Tag) (bool, error) {
368
368
        return common.HasPermission(r.state.UserAccess, user, operation, target)
369
369
}
370
370