Skip to content
This repository was archived by the owner on Dec 9, 2024. It is now read-only.

Commit 1c1f76a

Browse files
Remove paid features (#741)
* Remove paid features * Add MIT Expat license Co-authored-by: Jason Yavorska <[email protected]>
1 parent 4312a14 commit 1c1f76a

19 files changed

+34
-414
lines changed

LICENSE

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright (c) 2022 Jason Yavorska, Matija Cupic
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is
8+
furnished to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all
11+
copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
SOFTWARE.

app/controllers/subscriptions_controller.rb

Lines changed: 0 additions & 58 deletions
This file was deleted.

app/controllers/teams/users_controller.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,7 @@ def send_welcome_email(user)
4949
end
5050

5151
def add_user_flash!(team, user)
52-
if (team.users.count >= 5) && !team.subscription&.active?
53-
{ danger: 'You have reached the maximum 5 users on the free plan.' }
54-
elsif !user.valid?
52+
if !user.valid?
5553
{ danger: "There was a problem adding the user to the team. #{user.errors.full_messages.join(', ')}." }
5654
elsif user.team
5755
{ danger: 'User already belongs to a team.' }

app/models/team.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ class Team < ApplicationRecord
44
validates :name, presence: { allow_blank: false, allow_empty: false }, format: { without: %r{[:\\/]} }
55
validates :message, presence: { allow_blank: false, allow_empty: false, allow_nil: true }
66

7-
has_one :subscription, class_name: 'Team::Subscription', dependent: :destroy
8-
97
has_many :users, dependent: :nullify
108
has_many :topics, dependent: :destroy
119
end

app/models/team/subscription.rb

Lines changed: 0 additions & 11 deletions
This file was deleted.

app/packs/controllers/driverjs_controller.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -273,14 +273,6 @@ export default class extends Controller {
273273
'This section contains the list of users in your team. You can remove anyone by clicking on their name.'
274274
}
275275
},
276-
{
277-
element: '#subscription',
278-
popover: {
279-
title: 'Subscription Info',
280-
description:
281-
'You can check your current subscription status in this area.'
282-
}
283-
},
284276
{
285277
element: '#support-form',
286278
popover: {

app/services/fast_spring_account_linker.rb

Lines changed: 0 additions & 38 deletions
This file was deleted.

app/views/teams/edit.html.haml

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -59,32 +59,6 @@
5959
.row.mt-3
6060
!= pagy_bootstrap_nav(@pagy)
6161
%hr
62-
.row
63-
.col-lg-12
64-
%h3#subscription Subscription
65-
- if @team&.subscription&.active?
66-
%p
67-
You are on the Pro (paid) plan and can have up to fifty users on your
68-
team. If you are the user who set up the subscription, you
69-
can update and cancel your subscription via the
70-
= link_to 'Manage Subscription', edit_team_subscription_path(@team),
71-
target: :_blank, rel: :noopener
72-
page.
73-
%p
74-
If you are not the subscription owner, you will need to contact them to
75-
make changes. If you are unsure who the subscription owner is, use the
76-
contact form below to ask us.
77-
- else
78-
%p
79-
Upgrading from the Basic (free) to Pro (paid) plan will increase the
80-
number of users possible for your team from five to fifty. Details on
81-
pricing and features can be found on our
82-
= link_to 'pricing page', 'https://asyncgo.com/pricing', target: '_blank;',
83-
rel: 'noreferrer noopener'
84-
%button{ data: { controller: 'subscription', action: 'click->subscription#buy' },
85-
class: 'btn btn-primary' }
86-
Buy Subscription
87-
%hr
8862
.row
8963
.col-lg-12
9064
%h3#support-form Support/Feedback Form

config/credentials.yml.enc

Lines changed: 0 additions & 1 deletion
This file was deleted.

config/routes.rb

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,6 @@ def self.admin?(request)
3333
get :new_topic
3434
end
3535

36-
resources :subscriptions, only: [], constraints: { format: :json } do
37-
collection do
38-
post :update
39-
end
40-
end
41-
4236
resources :users, only: :edit do
4337
scope module: :users do
4438
resource :preferences, only: :update
@@ -72,8 +66,6 @@ def self.admin?(request)
7266
resources :votes, only: %i[create destroy]
7367
end
7468
end
75-
76-
resource :subscription, only: :edit
7769
end
7870
end
7971
end

0 commit comments

Comments
 (0)