{"id":26234862,"url":"https://github.com/flowpack/restrict-creation","last_synced_at":"2025-04-22T14:52:24.010Z","repository":{"id":33172456,"uuid":"153992934","full_name":"Flowpack/restrict-creation","owner":"Flowpack","description":"Restrict creation of nodes in certain content dimensions","archived":false,"fork":false,"pushed_at":"2024-07-01T09:52:11.000Z","size":821,"stargazers_count":8,"open_issues_count":19,"forks_count":3,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-29T16:11:16.714Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Flowpack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-10-21T09:40:35.000Z","updated_at":"2024-07-01T09:52:15.000Z","dependencies_parsed_at":"2023-02-12T03:45:35.633Z","dependency_job_id":null,"html_url":"https://github.com/Flowpack/restrict-creation","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flowpack%2Frestrict-creation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flowpack%2Frestrict-creation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flowpack%2Frestrict-creation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flowpack%2Frestrict-creation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Flowpack","download_url":"https://codeload.github.com/Flowpack/restrict-creation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250263560,"owners_count":21401911,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-13T02:29:28.935Z","updated_at":"2025-04-22T14:52:23.964Z","avatar_url":"https://github.com/Flowpack.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flowpack.RestrictCreation\n\nImagine the situation: you have a website with 'English (US)', 'English (UK)' and 'German' content dimensions present.\n\nNow you never want editors to create new nodes directly in 'English (UK)', without first creating them in 'English (US)' and almost never in 'German', but some really rare cases.\n\nThis package provides an option to enforce these kind of constraints:\n\n![restrictcreation](https://user-images.githubusercontent.com/837032/47265437-80bfcc80-d530-11e8-8e86-d469e2fb7ba7.gif)\n\n## Getting started:\n\n### Installation\n\n```bash\ncomposer require flowpack/restrictcreation\n```\n### Configuration\n\nConfigure your dimensions in `Settings.yaml`, e.g. like this:\n\n```yaml\nNeos:\n  ContentRepository:\n    contentDimensions:\n      language:\n        presets:\n          en_US:\n            label: 'English (US)'\n            values:\n              - en_US\n            uriSegment: en\n          en_UK:\n            label: 'English (UK)'\n            values:\n              - en_UK\n              - en_US\n            uriSegment: uk\n            restrictCreation:\n              mode: disallow\n              originPreset: en_US\n          de:\n            label: German\n            values:\n              - de\n            uriSegment: de\n            restrictCreation:\n              mode: warn\n              originPreset: en_US\n              documentNodesOnly: true\n```\n\n- `mode: warn` would only give a warning about creating a node in a possible wrong dimensiong.\n- `mode: disallow` would completely forbid creating new nodes in a certain dimension.\n- `documentNodesOnly: true` would trigger the warning only for document nodes: you would be able to create content nodes as usual, but creating document nodes in that dimension would be blocked/warned.\n\n## Acknowledgments\n\nThe initial development of this package is sponsored by [web\u0026co](http://webundco.com/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflowpack%2Frestrict-creation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflowpack%2Frestrict-creation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflowpack%2Frestrict-creation/lists"}