docbrown/app/policies
Andy Zhao 47d9ec27fb Allow users to belong to multiple orgs (#2583)
* Allow user to have many orgs

* Allow users to handle multi orgs in settings

* Make rounded buttons inline

* Add multi org function to dashboards

* Fix merge conflicts

* Fix mistake in merge conflict fix oops

* Display the correct membership level

* Fix accessibility issues

* Display organizations for article editors

* Handle submitting org id with preact editors

* Make listings work with multiple organizations

* Allow listings to have multiple orgs on create

* Display the correct number of credits for each org

* Move script tag to Webpack

* Allow multi orgs for purchasing and viewing credits

* Use OrganizationMembership as authorization check

* Display multiple organizations for notifications

* Allow dashboard to be viewable under multi-orgs

* Remove unused method

* Add multi-org functionality for article editors

* Show pro dashboard buttons for member+ org levels

* Leave the correct organization

* Allow article API to change org id

* Add left-out authorization method oops

* Make nav buttons a bit more clear

* Fix merge conflict

* Fix adding org id for /api/articles and tests

* Fix tests for org policy

* Use proper logic for displaying org members

* Update org actions with new authorization

* Use correct org when creating a listing

* Remove additional payment charge oops

* Mark org notifications as read with authorization

* Remove deprecated post_as_organization attribute

* Use new org_admin syntax

* Remove deprecated org logic for article create and update

* Default all RSS posts to not belong to any org

* Render org_member page for guest users

* Update org policy spec to work with multi orgs

* Use org_membership for org traits and move identity code

* Use org_member trait

* Update to work with multi-orgs

* Validate article's org_id if param org_id is blank

* Make  a let variable

* Remove unnecessary eager load for credits

* Fix HTML structure and org logic for non-org users

* Update credits spec for multi-org

* Add test for failed payment when purchased by org

* Lint listings_spec

* Test that the listing was created under the user

* Add tests for POST /listings multi-org

* Use double quotes for classes

* Fix /manage and a few other multi-org bugs

* Fix test for multi org

* Use correct method SQL exists? not Rails exist?

* Fix reads spec for multi-org

* Fix org_controller actions to work with multi org

* Test only multi org and not old usage and fix leave_org

* Fix org showing user profile img test for multi-org

* Fix org logic for users with no orgs

* Remove switch org functionality

* Update tests and add hidden param for org id

* Redirect to the specific organization

* Test other org button actions

* Use settings_notice instead of legacy notice and refactor

* Fix weird extra end issue prob from merge conflicts

* Test for with new flash key

* Fix user_views_org tests for multi-org

* Test for new flash message

* Update snapshot with new a11y html

* Move styling to stylesheet

* Add site admins functionality

* Move org_member? method in user model and refactor

* Use unspent_credits_count for organizations

* Add tests for /listings/new and minor bug fixes

* Use .present? in case of empty array

* Fix a lingering deprecated method

* Use greater than 1 for random numbers

* Add tests for counting spent and unspent credits
2019-06-04 09:30:52 -04:00
..
admin_policy.rb Various internal functionality adjustments (#1264) 2018-12-05 13:28:46 -05:00
api_secret_policy.rb ApiSecret model for Developer API (#1369) 2019-01-08 12:30:54 -05:00
application_policy.rb Add page for users to "manage" their posts after publication (distribution, etc.) (#2627) 2019-05-01 09:00:09 -04:00
article_policy.rb Allow users to belong to multiple orgs (#2583) 2019-06-04 09:30:52 -04:00
block_policy.rb #260 increase mentee-mentor description length (#405) 2018-08-20 10:20:23 -04:00
buffer_update_policy.rb Add page for users to "manage" their posts after publication (distribution, etc.) (#2627) 2019-05-01 09:00:09 -04:00
chat_channel_membership_policy.rb [WIP] Connect misc improvements/debugs (#2880) 2019-05-20 10:08:51 -04:00
chat_channel_policy.rb Clean up new chat channel functionality and add tests (#2220) 2019-03-26 13:35:32 -04:00
classified_listing_policy.rb Allow users to belong to multiple orgs (#2583) 2019-06-04 09:30:52 -04:00
comment_policy.rb Mute notifications for a comment thread (#1636) 2019-01-24 17:20:38 -05:00
follow_policy.rb Add point weights for tag follows (#1229) 2018-11-30 15:36:58 -05:00
github_repo_policy.rb Use Preact for asynchronous rendering for /settings/integrations (#986) 2018-10-31 15:51:07 -04:00
html_variant_policy.rb Add below-article html variant (#1669) 2019-01-28 14:31:43 -05:00
image_upload_policy.rb Edem/improvements/pundit coverage (#498) 2018-06-28 09:38:20 -04:00
message_policy.rb Edem/improvements/pundit coverage (#498) 2018-06-28 09:38:20 -04:00
organization_policy.rb Allow users to belong to multiple orgs (#2583) 2019-06-04 09:30:52 -04:00
rating_vote_policy.rb Add experience level averaging to articles (#1922) 2019-02-28 08:17:29 -08:00
reaction_policy.rb [Done] Add Reaction Policy Spec (#547) 2018-07-10 14:12:04 -04:00
stripe_active_card_policy.rb Add stripe policies and specs (#529) 2018-07-02 17:19:25 -04:00
stripe_subscription_policy.rb Add stripe policies and specs (#529) 2018-07-02 17:19:25 -04:00
tag_policy.rb Update tag admin page(#1990) 2019-03-06 14:28:30 -05:00
user_policy.rb Allow users to belong to multiple orgs (#2583) 2019-06-04 09:30:52 -04:00
video_policy.rb Remove harsh video restriction and add video duration (#1811) 2019-02-16 17:42:44 -04:00