bullet_train 1.3.10 → 1.3.12

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 367afc5adafaf83cacca910e8ac20da989953ac282dac2dbff3664e99debb4b3
4
- data.tar.gz: 3d7476659c6668da6976f3f5d2767ffa2f3af62d6652cf5d2ce54de450cfce2a
3
+ metadata.gz: ff63727028d8970aacd62bb659702ef467d8ee0627935977b444cb49e77f1344
4
+ data.tar.gz: 5f136b1f3c5c320cfecbcb52103f327fd48e043647e54473db02b2c6c5a2df3e
5
5
  SHA512:
6
- metadata.gz: 1ee14729e078f27486c9f39ca35a24515ae206e5fe7c04d7b722af3c75f6c97dcb72a7be41e782d2a6c8d6bc4378db6e5b78a2ae1542b860898afc924b866e9e
7
- data.tar.gz: 7147b9f3b76b47103ed03fbe63645e7772c2fd3b8c9222b2bb4f2f2dcf7ea51aa3908cbf96013da76e68b394f9d551967cf506079189fc8603895d16dfd4910c
6
+ metadata.gz: 2d5d9b223e72b434743d32e1e82902d4b9ca5eec1379420d2f5bf8afaeae25987cc10e111aaf7623cd5ad37025fd055e86457dc816b17ba29c519bb4da88f066
7
+ data.tar.gz: '0539a2acd42bd86c633c1733e89e4bd0837775b5786d15732f0f36bbe07f38c8f3fc395973877d56d7b7948033f945ac89b163e73904fe33cc5a5f2f14821142'
@@ -9,7 +9,7 @@ module Invitations::Base
9
9
 
10
10
  accepts_nested_attributes_for :membership
11
11
 
12
- validates :email, presence: true
12
+ validates :email, presence: true, uniqueness: {scope: :team}
13
13
 
14
14
  after_create :set_added_by_membership
15
15
  after_create :send_invitation_email
@@ -21,6 +21,8 @@ module Memberships::Base
21
21
  # Image uploading
22
22
  has_one_attached :user_profile_photo
23
23
 
24
+ validates :user_email, uniqueness: {scope: :team}
25
+
24
26
  after_destroy do
25
27
  # if we're destroying a user's membership to the team they have set as
26
28
  # current, then we need to remove that so they don't get an error.
@@ -71,7 +71,7 @@ module Users::Base
71
71
  def create_default_team
72
72
  # This creates a `Membership`, because `User` `has_many :teams, through: :memberships`
73
73
  default_team = teams.create(name: I18n.t("teams.new.default_team_name"), time_zone: time_zone)
74
- memberships.find_by(team: default_team).update role_ids: [Role.admin.id]
74
+ memberships.find_by(team: default_team).update(user_email: email, role_ids: [Role.admin.id])
75
75
  update(current_team: default_team)
76
76
  end
77
77
 
@@ -59,6 +59,7 @@ en:
59
59
  resent: 'Invitation was successfully resent.'
60
60
  resent_error: Sorry, we couldn't find an invitation to resend.
61
61
  doesnt_exist: Sorry, but we couldn't find your invitation. Please contact an administrator on the team to have them send you another one.
62
+ duplicate: 'Sorry, a member with the email %{user_email} has already been invited.'
62
63
  values:
63
64
  name: 'Invitation to Join %{team_name}'
64
65
  account:
@@ -13,5 +13,6 @@ The following configuration options are available for your Bullet Train applicat
13
13
  | `OPENAI_ACCESS_TOKEN` | Enable OpenAI-powered UX improvements | `sk-Tnko8PI15i6du03KkxVExTz3lbkFJV...` | `openai_enabled?` |
14
14
  | `REDOCLY_ORGANIZATION_ID` | Enable Redocly-powered API documentation | `your-organization-name` | |
15
15
  | `REDOCLY_API_KEY` | Enable Redocly-powered API documentation |`orgsk_lfyrXAAym8nbSrar9b8wvTN+...`| |
16
+ | `DISABLE_DEVELOPER_MENU` | Disable the `developer` tab in the navigation bar | `true` | disable_developer_menu? |
16
17
 
17
- <sup><a name="footnote-1"></a>1</sup> Any credentials listed here aren't real, but we wanted you to know what each looks like so you can recognize the correct value from each provider.
18
+ <sup><a name="footnote-1"></a>1</sup> Any credentials listed here aren't real, but we wanted you to know what each looks like so you can recognize the correct value from each provider.
@@ -1,3 +1,3 @@
1
1
  module BulletTrain
2
- VERSION = "1.3.10"
2
+ VERSION = "1.3.12"
3
3
  end
data/lib/bullet_train.rb CHANGED
@@ -166,3 +166,7 @@ end
166
166
  def openai_organization_exists?
167
167
  ENV["OPENAI_ORGANIZATION_ID"]
168
168
  end
169
+
170
+ def disable_developer_menu?
171
+ ENV["DISABLE_DEVELOPER_MENU"].present?
172
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bullet_train
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.10
4
+ version: 1.3.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Culver
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-22 00:00:00.000000000 Z
11
+ date: 2023-08-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: standard