|
|
|
@@ -93,6 +93,7 @@ type SearchDatasetOptions struct { |
|
|
|
IncludePublic bool |
|
|
|
ListOptions |
|
|
|
SearchOrderBy |
|
|
|
IsOwner bool |
|
|
|
} |
|
|
|
|
|
|
|
func CreateDataset(dataset *Dataset) (err error) { |
|
|
|
@@ -150,6 +151,9 @@ func SearchDatasetCondition(opts *SearchDatasetOptions) builder.Cond { |
|
|
|
} |
|
|
|
} else if opts.OwnerID > 0 { |
|
|
|
cond = cond.And(builder.Eq{"repository.owner_id": opts.OwnerID}) |
|
|
|
if !opts.IsOwner { |
|
|
|
cond = cond.And(builder.Eq{"dataset.status": DatasetStatusPublic}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return cond |
|
|
|
|