docbrown/app/models
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
..
concerns Enables Rails cops (#2186) 2019-03-25 09:25:55 -04:00
api_secret.rb ApiSecret model for Developer API (#1369) 2019-01-08 12:30:54 -05:00
application_record.rb Initial commit 2018-02-28 16:11:08 -05:00
article.rb Allow users to belong to multiple orgs (#2583) 2019-06-04 09:30:52 -04:00
badge.rb Improved article slug generation (#2218) 2019-03-26 13:39:35 -04:00
badge_achievement.rb Implemented ActiveJob for badge_achievements#send_email_notification (#2962) 2019-05-27 09:44:38 -04:00
block.rb Rubocop cleanups (#1415) 2019-01-02 11:20:02 -05:00
broadcast.rb Enables Rails cops (#2186) 2019-03-25 09:25:55 -04:00
buffer_update.rb Fix buffer text not updating (#2699) 2019-05-05 11:51:30 -04:00
chat_channel.rb [WIP] Connect misc improvements/debugs (#2880) 2019-05-20 10:08:51 -04:00
chat_channel_membership.rb Add safe navigation within chatchannelmemberships and remove some console.logs (#2903) 2019-05-20 13:20:06 -04:00
classified_listing.rb Allow users to belong to multiple orgs (#2583) 2019-06-04 09:30:52 -04:00
collection.rb Enables Rails cops (#2186) 2019-03-25 09:25:55 -04:00
comment.rb Refactor: fix issues raised by bullet (#2965) 2019-05-28 17:32:53 -04:00
credit.rb Allow users to belong to multiple orgs (#2583) 2019-06-04 09:30:52 -04:00
display_ad.rb Enable Layout/AlignParameters (#2340) 2019-04-08 18:47:34 -04:00
email_message.rb Fix repeated queries for reports (#835) 2018-10-09 12:42:55 -04:00
event.rb Improved article slug generation (#2218) 2019-03-26 13:39:35 -04:00
feedback_message.rb Add report abuse link to listings (#2684) 2019-05-04 09:06:42 -04:00
follow.rb Enables Rails cops (#2186) 2019-03-25 09:25:55 -04:00
github_issue.rb Fixed some Style/* rubocop violations (#2314) 2019-04-06 14:24:33 -04:00
github_repo.rb Enables Rails cops (#2186) 2019-03-25 09:25:55 -04:00
html_variant.rb Enable Layout/AlignParameters (#2340) 2019-04-08 18:47:34 -04:00
html_variant_success.rb Add HTML variants for cta optimization and other nav bar adjustments (#970) 2018-10-22 17:03:57 -04:00
html_variant_trial.rb Add HTML variants for cta optimization and other nav bar adjustments (#970) 2018-10-22 17:03:57 -04:00
identity.rb Optimize sign in: Identity #2061 (#2231) 2019-03-28 16:10:23 -04:00
job_opportunity.rb Enable Layout/AlignParameters (#2340) 2019-04-08 18:47:34 -04:00
languages.rb Change format of the user languages_settings #2369 (#2496) 2019-04-30 17:01:19 -04:00
mention.rb Enables Rails cops (#2186) 2019-03-25 09:25:55 -04:00
mentor_relationship.rb Enables Rails cops (#2186) 2019-03-25 09:25:55 -04:00
message.rb [WIP] Connect misc improvements/debugs (#2880) 2019-05-20 10:08:51 -04:00
note.rb Add user status to internal/users (#1444) 2019-01-03 16:44:43 -05:00
notification.rb Move remove_each notifications method in own job (#2946) 2019-05-29 16:26:18 -04:00
organization.rb Allow users to belong to multiple orgs (#2583) 2019-06-04 09:30:52 -04:00
organization_membership.rb Allow users to belong to multiple orgs (#2583) 2019-06-04 09:30:52 -04:00
page.rb Add security and faq pages as generatable via the Page model (#2792) 2019-05-10 16:20:40 -04:00
page_view.rb Add page_view model (#1985) 2019-03-07 11:53:33 -08:00
podcast.rb Allow users to follow podcasts (#2690) 2019-05-04 15:30:40 -04:00
podcast_episode.rb Enable Layout/AlignParameters (#2340) 2019-04-08 18:47:34 -04:00
push_notification_subscription.rb Rubocop Style cops enabled (#2056) 2019-03-15 18:33:54 -04:00
rating_vote.rb Add page for users to "manage" their posts after publication (distribution, etc.) (#2627) 2019-05-01 09:00:09 -04:00
reaction.rb Add reading time to reading list (#2929) 2019-05-31 16:45:29 -04:00
role.rb Allow users to belong to multiple orgs (#2583) 2019-06-04 09:30:52 -04:00
search_keyword.rb Rubocop Style cops enabled (#2056) 2019-03-15 18:33:54 -04:00
tag.rb Enable Layout/AlignParameters (#2340) 2019-04-08 18:47:34 -04:00
tag_adjustment.rb Rubocop Style cops enabled (#2056) 2019-03-15 18:33:54 -04:00
tweet.rb Enables Rails cops (#2186) 2019-03-25 09:25:55 -04:00
user.rb Allow users to belong to multiple orgs (#2583) 2019-06-04 09:30:52 -04:00