(policy *storepb.QueryDataPolicy)
| 202 | } |
| 203 | |
| 204 | func formatEffectiveQueryDataPolicy(policy *storepb.QueryDataPolicy) *EffectiveQueryDataPolicy { |
| 205 | maximumResultRows := policy.GetMaximumResultRows() |
| 206 | if maximumResultRows <= 0 { |
| 207 | maximumResultRows = math.MaxInt32 |
| 208 | } |
| 209 | |
| 210 | return &EffectiveQueryDataPolicy{ |
| 211 | MaximumResultRows: maximumResultRows, |
| 212 | DisableCopyData: policy.GetDisableCopyData(), |
| 213 | DisableExport: policy.GetDisableExport(), |
| 214 | AllowAdminDataSource: policy.GetAllowAdminDataSource(), |
| 215 | } |
| 216 | } |
| 217 | |
| 218 | func (s *Store) GetEffectiveQueryDataPolicy(ctx context.Context, workspaceID string, projectFullName string) (*EffectiveQueryDataPolicy, error) { |
| 219 | workspaceResource := common.FormatWorkspace(workspaceID) |
no test coverage detected