code: func ConvertPermissionsMapAndRolesToAccountPermissions(permissions map[string]bool,
  	roles []string) (*AccountPermissions, error) {
  	var err error
  	accountPermissions := &AccountPermissions{}
  	accountPermissions.Base, err = convertPermissionsMapStringIntToBasePermissions(permissions)
  	if err != nil {
  		return nil, err
  	}
  	accountPermissions.Roles = roles
  	return accountPermissions, nil
  }
docs: // ConvertMapStringIntToPermissions converts a map of string-bool pairs and a slice of
  // strings for the roles to an AccountPermissions type. If the value in the
  // permissions map is true for a particular permission string then the permission
  // will be set in the AccountsPermissions. For all unmentioned permissions the
  // ZeroBasePermissions is defaulted to.