Skip to content
This repository has been archived by the owner on Mar 18, 2021. It is now read-only.

Commit

Permalink
Merge pull request #59 from G5/user-current-client-urn
Browse files Browse the repository at this point in the history
adding user.current_client_urn for Pundit
  • Loading branch information
perryqh authored Dec 20, 2018
2 parents 142c32e + 1d98cbd commit 1947d06
Show file tree
Hide file tree
Showing 4 changed files with 134 additions and 126 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## v1.1.2 (2018-12-20)
* Adding `User.current_client_urn` to better support Pundit authorization
## v1.1.1 (2018-06-21)

* Support rails 5.2 green field apps, including fixes for setting the default
Expand Down
1 change: 1 addition & 0 deletions app/models/g5_authenticatable/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class User < ActiveRecord::Base

validates :email, presence: true, uniqueness: true
validates_uniqueness_of :uid, scope: :provider
attr_accessor :current_client_urn # helpful for authorizing in Pudit

GLOBAL_ROLE = 'GLOBAL'

Expand Down
2 changes: 1 addition & 1 deletion lib/g5_authenticatable/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module G5Authenticatable
VERSION = '1.1.1'
VERSION = '1.1.2'
end
Loading

0 comments on commit 1947d06

Please sign in to comment.