grape

https://github.com/intridea/grape

Ruby

An opinionated framework for creating REST-like APIs in Ruby.

IssuesFinder#user_cannot_see_confidential_issues?

Anonymous users can't see any confidential issues.

Users without access to see _all_ confidential issues (as in
`user_can_see_all_confidential_issues?`) are more complicated, because they
can see confidential issues where:
1. They are an assignee.
2. They are an author.

That's fine for most cases, but if we're just counting, we need to cache
effectively. If we cached this accurately, we'd have a cache key for every
authenticated user without sufficient access to the project. Instead, when
we are counting, we treat them as if they can't see any confidential issues.

This does mean the counts may be wrong for those users, but avoids an
explosion in cache keys.

Source | Google | Stack overflow

Edit

git clone [email protected]:intridea/grape.git

cd grape

open

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-IssuesFinder-user_cannot_see_confidential_issues--for-pr


# Commit to git

git add git commit -m "better docs for IssuesFinder#user_cannot_see_confidential_issues?"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-IssuesFinder-user_cannot_see_confidential_issues--for-pr

hub pull-request


# Celebrate!