hyperstack-org / hyperstack-org/hyperstack

Incorrect documentation about server operations

Open
#267 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
538
Forks
41
PR merge metrics
No merged PRs in 30d

Description

On this page: https://docs.hyperstack.org/dsl-isomorphic/hyper-operation#server-operations
there is this example code snippet:
```
validate { raise Hyperstack::AccessViolation unless params.acting_user.admin? }
```
That doesn't seem to work properly. One working alternative is:
```
validate { params.acting_user.admin? }
```
Another alternative:
```
validate { params.acting_user.admin? || raise Hyperstack::AccessViolation }
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.