Skip to content

Conversation

@maudetes
Copy link
Contributor

@maudetes maudetes commented Nov 28, 2025

Use organizationsOnly logic implemented in #736 and andd adminOnly.

nicolaskempf57 and others added 15 commits November 12, 2025 11:56
- Move related code to TabularEditor component
- Integrate papaparse for CSV parsing
- Refactor Step2Sheet to use the new editor
- Update schema types with additional field properties
- Improve data loading and schema association steps
- Replace DSFR icon spans with RemixIcon components
- Remove console.debug statements
- Use nextTick instead of setTimeout for better timing control
Replace useState pattern with defineModel for cleaner component API
- Use v-model for resources in Step2Sheet
- Auto-populate dataset title and description from schema
- Improve layout of Step1 form structure
- Add loading progress indicator during resource upload
- Simplify step validation logic
- Ensure file generation before proceeding to next step
Add enableStructuredDatasetForm runtime config to toggle between the new internal structured dataset form (/admin/datasets/structured) and the external schema publishing service.

- Add enableStructuredDatasetForm boolean config (defaults to false)
- Add TypeScript type definition for the new config
- Update schema publishing button to use computed URL based on feature flag
- When enabled: redirects to /admin/datasets/structured?step=1
- When disabled: redirects to schemaPublishingUrl (publier.etalab.studio)
Comment on lines +85 to +87
// we fetch full organization object because we need members details
// in case we want to filter on admin only organizations
const organizations = await Promise.all(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any more straightforward way to know organizations for which the user is admin?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The computed code can be simplified when this one is merged https://github.com/datagouv/cdata/pull/790/files.

But if we don't want to query all organizations, I think members should be added to the api/1/me

Copy link
Contributor Author

@maudetes maudetes Nov 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say it seems overkill to get the entire organization members on api/1/me for now!
We may change it if we have other use cases than harvest publication form.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we expose a permission field instead ? Like the one in the dataservice model

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also think it's better to expose a permission field…

Base automatically changed from publier-schema to main November 28, 2025 15:53
Copy link
Contributor Author

@maudetes maudetes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A better approach could be that we have udata return the permissions directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants