code: func convertPermissionsMapStringIntToBasePermissions(permissions map[string]bool) (BasePermissions, error) {
  	// initialise basePermissions as ZeroBasePermissions
  	basePermissions := ZeroBasePermissions
  
  	for permissionName, value := range permissions {
  		permissionsFlag, err := PermStringToFlag(permissionName)
  		if err != nil {
  			return basePermissions, err
  		}
  		// sets the permissions bitflag and the setbit flag for the permission.
  		basePermissions.Set(permissionsFlag, value)
  	}
  
  	return basePermissions, nil
  }
docs: // convertPermissionsMapStringIntToBasePermissions converts a map of string-bool
  // pairs to BasePermissions.