// AddPermissionRequest mocks base method
961173
func (m *MockLambdaAPI) AddPermissionRequest(arg0 *lambda.AddPermissionInput) (*request.Request, *lambda.AddPermissionOutput) {
	ret := m.ctrl.Call(m, "AddPermissionRequest", arg0)
	ret0, _ := ret[0].(*request.Request)
	ret1, _ := ret[1].(*lambda.AddPermissionOutput)
	return ret0, ret1
}
612897
func NewPermissionService(context servicecontext.ServiceContext) service.PermissionService {
	return &permissionServiceImpl{base.NewBaseService(context)}
}
1250520
func (t *TeamProjectOptions) GetPermission() string {
	if t == nil || t.Permission == nil {
		return ""
	}
	return *t.Permission
}
354469
func (s *ManagedPolicyDetail) SetPermissionsBoundaryUsageCount(v int64) *ManagedPolicyDetail {
	s.PermissionsBoundaryUsageCount = &v
	return s
}
322817
func NewPermission(a Action, rt ResourceType, orgID ID) (*Permission, error) {
	p := &Permission{
		Action: a,
		Resource: Resource{
			Type:  rt,
			OrgID: &orgID,
		},
	}

	return p, p.Valid()
}
1135236
func (l Listener) OnPermissionDenied(e *gumble.PermissionDeniedEvent) {
	if l.PermissionDenied != nil {
		l.PermissionDenied(e)
	}
}
750024
func validatePermission(permission string) error {
	switch permission {
	case "public-read":
		return nil
	case "private":
		return nil
	case "public-read-write":
		return nil
	case "authenticated-read":
		return nil
	case "bucket-owner-read":
		return nil
	case "bucket-owner-full-control":
		return nil
	}
	return fmt.Errorf("unsupported permission: %q", permission)
}
726750
func (m *MockLambdaAPI) RemovePermission(arg0 *lambda.RemovePermissionInput) (*lambda.RemovePermissionOutput, error) {
	ret := m.ctrl.Call(m, "RemovePermission", arg0)
	ret0, _ := ret[0].(*lambda.RemovePermissionOutput)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}
662056
func (e *SyncedEnforcer) HasPermissionForUser(user string, permission ...string) bool {
	e.m.Lock()
	defer e.m.Unlock()
	return e.Enforcer.HasPermissionForUser(user, permission...)
}
412643
func (t *Team) GetPermission() string {
	if t == nil || t.Permission == nil {
		return ""
	}
	return *t.Permission
}
871689
func (m *MultipartStreamer) SetupRequest(req *http.Request) {
	req.Body = m.GetReader()
	req.Header.Add("Content-Type", m.ContentType)
	req.ContentLength = m.Len()
}
1249983
func (s *RoleService) CreateRolePermission(p *CreateRolePermissionParams) (*CreateRolePermissionResponse, error) {
	resp, err := s.cs.newRequest("createRolePermission", p.toURLValues())
	if err != nil {
		return nil, err
	}

	var r CreateRolePermissionResponse
	if err := json.Unmarshal(resp, &r); err != nil {
		return nil, err
	}

	return &r, nil
}
906933
func (u *User) GetPermissions() map[string]bool {
	if u == nil || u.Permissions == nil {
		return map[string]bool{}
	}
	return *u.Permissions
}
664255
func (c *CredentialsStore) HasPermRequest(b BasicAuther, perm string) bool {
	username, _, ok := b.BasicAuth()
	if !ok {
		return false
	}
	return c.HasPerm(username, perm)
}
87736
func (perm *Permissions) AddUserPath(prefix string) {
	perm.userPathPrefixes = append(perm.userPathPrefixes, prefix)
}
407130
func (e *Enforcer) HasPermissionForUser(user string, permission ...string) bool {
	params := make([]interface{}, 0, len(permission)+1)

	params = append(params, user)
	for _, perm := range permission {
		params = append(params, perm)
	}

	return e.HasPolicy(params...)
}
393024
func (r *RepositoryPermissionLevel) GetPermission() string {
	if r == nil || r.Permission == nil {
		return ""
	}
	return *r.Permission
}