propel_authentication 0.3.1 → 0.3.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2b951cffb4dd4a53fd4f5b16e3f30f97a4fb4e4dae4999f30aeb6ea3ca44bd1f
4
- data.tar.gz: c8077baca253a2a5ab7770f75043a948adb7fa7e922572c4bd898c0c7fcb979a
3
+ metadata.gz: eee864f6ceef8c65abe8b58b9729e12bd840d0c3ae307204b10bb4d84bd8f1c6
4
+ data.tar.gz: 2ea848e49d73a96c935bc9df1dd73a98c17f824ebfbcbacdc6ff17a982b0c4f3
5
5
  SHA512:
6
- metadata.gz: d6996169826450be372a4d8be3c5a5a325bdeb842de547ff8be9a47e3511cec95046a49823964e92b4985da6ef3b0cd1b168dc5c08a9e5865be617168e3f789e
7
- data.tar.gz: d4417d0632e329aa1ab1bfbd0d865827af970cf7d3a9b598fbbcb4f52f649fc0a6119c94d7a912482b2b9cb2ddb54bb7606d2ec6a8a242e4c400cb4c3f65fb39
6
+ metadata.gz: 1144b61efab4d8df004d246ee653bb0cdc4d163484b34d445d8fe2bef47dbb983d1889e62bcef288ebc4ae60d0f0eb7c26501b87906ff9a138e0b7a29eb90fbc
7
+ data.tar.gz: 5bae85ac085adcd08f461f631d7e375064d2a227d06340a5fed5ddef3ea9210cfc32b00318ee72bb946825094a4eb681be9534293e9c09a64a52a1d0301d459d
data/CHANGELOG.md CHANGED
@@ -13,6 +13,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
13
13
  - Session management and device tracking
14
14
  - Advanced password policies
15
15
 
16
+ ## [0.3.1.2] - 2025-09-11
17
+
18
+ ### 🔧 Compatibility Updates
19
+ - **PropelApi Integration**: Enhanced compatibility with PropelApi 0.3.1.2's new JSON field defaults feature
20
+ - Authentication model templates now work seamlessly with automatic JSON field defaults
21
+ - Better coordination with PropelApi's enhanced migration generation system
22
+ - Improved fixture generation for JSON fields with default values
23
+
24
+ ### 🐛 Bug Fixes
25
+ - **HTTP Status Code Consistency**: Fixed tokens controller HTTP status codes for better standards compliance
26
+ - Changed parameter validation errors from `:unprocessable_content` (422) to `:bad_request` (400)
27
+ - More consistent error responses across authentication endpoints
28
+ - Better alignment with standard HTTP parameter validation practices
29
+
30
+ ## [0.3.1.1] - 2025-09-11
31
+
32
+ ### 🐛 Bug Fixes
33
+ - **PostgreSQL Migration Compatibility**: Fixed migration generation issues affecting PostgreSQL databases
34
+ - Enhanced migration templates for agencies, agents, organizations, and users to work correctly with PostgreSQL
35
+ - Fixed foreign key constraint generation for PostgreSQL compatibility
36
+ - Corrected multi-tenant migration templates for better PostgreSQL support
37
+
16
38
  ## [0.3.1] - 2025-09-11
17
39
 
18
40
  ### 🔧 Installation & Configuration Improvements
@@ -76,12 +76,16 @@ module PropelAuthentication
76
76
  def copy_authentication_models
77
77
  # Detect rendering engine for conditional facet generation
78
78
  @rendering_engine = detect_rendering_engine
79
-
80
- copy_users_model
81
- copy_invitations_model
79
+ # Organizations must be created first if required (users depend on organizations)
82
80
  copy_organizations_model if organization_required?
81
+ # Agencies must be created before agents and users (if agency auth is enabled)
83
82
  copy_agencies_model if agency_required?
83
+ # Users can now be created (organizations and agencies exist)
84
+ copy_users_model
85
+ # Agents depend on users and agencies
84
86
  copy_agents_model if agency_required?
87
+ # Invitations depend on users and organizations
88
+ copy_invitations_model
85
89
  end
86
90
 
87
91
  def copy_authentication_concerns
@@ -183,11 +187,16 @@ module PropelAuthentication
183
187
  end
184
188
 
185
189
  def copy_authentication_migrations_and_fixtures
186
- copy_users_migration_and_fixtures
187
- copy_invitations_migration_and_fixtures
190
+ # Organizations must be created first if required (users depend on organizations)
188
191
  copy_organizations_migration_and_fixtures if organization_required?
192
+ # Agencies must be created before agents and users (if agency auth is enabled)
189
193
  copy_agencies_migration_and_fixtures if agency_required?
194
+ # Users can now be created (organizations and agencies exist)
195
+ copy_users_migration_and_fixtures
196
+ # Agents depend on users and agencies
190
197
  copy_agents_migration_and_fixtures if agency_required?
198
+ # Invitations depend on users and organizations
199
+ copy_invitations_migration_and_fixtures
191
200
  end
192
201
 
193
202
  def copy_database_seeds
@@ -66,7 +66,7 @@ class <%= auth_controller_class_name('tokens') %> < Api::BaseController
66
66
  token = params[:token]
67
67
 
68
68
  if token.blank?
69
- render json: { error: 'Token is required' }, status: :unprocessable_content
69
+ render json: { error: 'Token is required' }, status: :bad_request
70
70
  return
71
71
  end
72
72
 
@@ -104,7 +104,7 @@ class <%= auth_controller_class_name('tokens') %> < Api::BaseController
104
104
 
105
105
  def validate_login_parameters
106
106
  unless params[:user].present? && params[:user][:email_address].present? && params[:user][:password].present?
107
- render json: { error: 'Email address and password are required' }, status: :unprocessable_content
107
+ render json: { error: 'Email address and password are required' }, status: :bad_request
108
108
  end
109
109
  end
110
110
  end
@@ -1,3 +1,3 @@
1
1
  module PropelAuthentication
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: propel_authentication
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Propel Team
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-09-11 00:00:00.000000000 Z
11
+ date: 2025-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails