Incorrect documentation about server operations

Open Beginner friendly
#267 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Stale
Tech stack
ruby
Domain
documentation

Research direction

Open the Server Operations section at the linked documentation page and compare its validate example with the working alternatives described in the issue. Update the example so the page no longer shows the non-working form; done means the documented validation example reflects a working alternative.

Written by the indexing model from the issue text.

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 }
Dominant language
JavaScript
Stars
538
Forks
41
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from hyperstack-org/hyperstack

All issues in hyperstack-org/hyperstack

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.