Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crud granularity #180

Merged
merged 6 commits into from
May 31, 2022
Merged

Crud granularity #180

merged 6 commits into from
May 31, 2022

Conversation

sdimitris
Copy link
Contributor

Options for required authentication in differ crud operations provided.
Admin can decide whenever a CRUD operation can be done from an authenticated user.
Also , admin can decide if a CRUD route is disabled or enabled.

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Build-related changes
  • Other (please describe)

Other information:

modelOptions migrated to

  "modelOptions": {
    "conduit": {
      "cms": {
        "enabled": true,
        "crudOperations": {
          "create": {
            "enabled": true,
            "authenticated": false
          },
          "read": {
            "enabled": true,
            "authenticated": false
          },
          "update": {
            "enabled": true,
            "authenticated": false
          },
          "delete": {
            "enabled": true,
            "authenticated": false
          }
        }
      },
      "permissions": {
        "extendable": true,
        "canCreate": true,
        "canModify": "Everything",
        "canDelete": true
      }
    }
  },

Usage Example

modelOptions.conduit.cms.create.enabled = true  -> POST routes are accessible
modelOptions.conduit.cms.create.authenticated = true  ->POST routes are accessible only by authenticated users

@kkopanidis kkopanidis merged commit 86cfa37 into main May 31, 2022
@kkopanidis kkopanidis deleted the crud_granularity branch May 31, 2022 15:18
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.

None yet

3 participants