docbrown/spec/policies
Jeremy Friesen 4509e81dd5
Ensuring the same policies for analytics (#16997)
Prior to this commit the following situation existed:

> The path /dashboard/analytics/org/:id requires user
> authentication (e.g. signed in). However, it does not enforce
> authorization. Anyone can see this page. The page, however, uses
> javascript to populate the data. So no information, aside from the org
> name associated with the :id leaks out. The javascript API end point
> enforces organization membership.
>
> I would expect that the authorization in the HTML rendering would be
> the same as the javascript API end point.

This commit ensures that the dashboards#analytics end point uses the
same policy logic as the API analytics end points.  Further, it keeps
folks who aren't org members out of the base HTML page for other orgs.

Closes forem/forem/#16985
2022-03-25 14:57:01 -04:00
..
shared_examples Penciling in a Default Spaces section (#16897) 2022-03-21 09:56:12 -04:00
admin_policy_spec.rb Use build_stubbed in Policy specs (#4017) [ci skip] 2019-09-13 11:38:58 -04:00
api_secret_policy_spec.rb Rename banned and comment_banned roles (#12270) 2021-04-06 10:12:14 -05:00
application_policy_spec.rb Ensuring the VideoPolicy adhears to article creation (#16762) 2022-03-07 15:27:18 -05:00
article_policy_spec.rb Adding ArticlePolicy#has_existing_articles_or_can_create_new_ones? (#16944) 2022-03-22 16:01:44 -04:00
authorizer_spec.rb Refactoring questions asked of user (#15762) 2021-12-21 12:45:12 -05:00
comment_policy_spec.rb Adjusting suspended user authorizations (#16634) 2022-02-21 10:08:24 -05:00
discussion_lock_policy_spec.rb Create DiscussionLocks (#13905) 2021-06-10 11:04:33 -04:00
follow_policy_spec.rb Adjusting suspended user authorizations (#16634) 2022-02-21 10:08:24 -05:00
github_repo_policy_spec.rb Split Settings::Authentication from SiteConfig (#13095) 2021-04-12 09:41:09 +02:00
html_variant_policy_spec.rb Use build_stubbed in Policy specs (#4017) [ci skip] 2019-09-13 11:38:58 -04:00
image_upload_policy_spec.rb Rename banned and comment_banned roles (#12270) 2021-04-06 10:12:14 -05:00
internal_policy_spec.rb Refactoring questions asked of user (#15762) 2021-12-21 12:45:12 -05:00
liquid_tag_policy_spec.rb Refactoring questions asked of user (#15762) 2021-12-21 12:45:12 -05:00
organization_policy_spec.rb Ensuring the same policies for analytics (#16997) 2022-03-25 14:57:01 -04:00
pinned_article_policy_spec.rb expect to forbid, rather than expect not to permit (#14390) 2021-07-30 11:42:47 -05:00
reaction_policy_spec.rb Adjusting suspended user authorizations (#16634) 2022-02-21 10:08:24 -05:00
response_template_policy_spec.rb Add response templates for internal usage (#6676) 2020-03-20 11:32:55 -04:00
space_policy_spec.rb Penciling in a Default Spaces section (#16897) 2022-03-21 09:56:12 -04:00
stripe_active_card_policy_spec.rb Rename banned and comment_banned roles (#12270) 2021-04-06 10:12:14 -05:00
tag_policy_spec.rb Use build_stubbed in Policy specs (#4017) [ci skip] 2019-09-13 11:38:58 -04:00
user_policy_spec.rb Ensuring the same policies for analytics (#16997) 2022-03-25 14:57:01 -04:00
video_policy_spec.rb Ensuring the VideoPolicy adhears to article creation (#16762) 2022-03-07 15:27:18 -05:00