31 lines
775 B
Markdown
31 lines
775 B
Markdown
# Test access CLI
|
|
|
|
Grant a plan and all modules mapped through `commerce.access_plan_modules`:
|
|
|
|
```bash
|
|
python -m app.cli.access grant-plan \
|
|
--email user@example.com \
|
|
--plan-code POINTS_ACU
|
|
```
|
|
|
|
Optional finite test access:
|
|
|
|
```bash
|
|
python -m app.cli.access grant-plan \
|
|
--email user@example.com \
|
|
--plan-code POINTS_ACU \
|
|
--expires-in-days 30
|
|
```
|
|
|
|
Revoke access sourced from the plan:
|
|
|
|
```bash
|
|
python -m app.cli.access revoke-plan \
|
|
--email user@example.com \
|
|
--plan-code POINTS_ACU
|
|
```
|
|
|
|
`--user-id <uuid>` can be used instead of `--email`.
|
|
|
|
The grant operation is idempotent for an already-active subscription and active module entitlements. It never invents plan/module mappings; the selected plan must already have rows in `commerce.access_plan_modules`.
|