easy_login 1.3.0 → 1.3.1

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
  SHA1:
3
- metadata.gz: c71315035ea81df325d76eab8ab2f4818f8ce99d
4
- data.tar.gz: f210d6d83509cfdc458b1827eccf4c35b8fca874
3
+ metadata.gz: 90c1b0dfb4a988eb8730d3e2d5eb629c27f3204f
4
+ data.tar.gz: 65b1f32113d62cbb1969aab015a08f72f906105d
5
5
  SHA512:
6
- metadata.gz: 81479889ff8dcf1b261b2290b684b8f814091b253d3f7215680baf5f70f36150edfefd4cfdbae4ba492937dfefdeb0b427878bca076938a26c147102e461bcef
7
- data.tar.gz: 6461bea509ef705b122446a57e0aec9deb24a75cc424df4efd54a8b764f219a161db92856170d7f446056106abff61d0bfb2327fbaaf02060d17e14c52a24cba
6
+ metadata.gz: 7ea9abf0ecbfdc5817f520b2e559de2f86fc55122c10ba151e6c24bfafcd29b396402b96d5447d9f6cd90ee9064ea2aeaca22b9ba10c9978e01408b5885f1bdd
7
+ data.tar.gz: 6653bf4823ae177a578a0c1831d27c7b406b0d4996cdf1ca5716edae9341fb0d072989fc8f06654078a7b3b4d171999a9175b39e1b958a300c562c88ced48863
data/README.md CHANGED
@@ -54,7 +54,7 @@ The following is a default code of `config/http_permissions.yml`
54
54
  default:
55
55
  ope: pass
56
56
  customer: pass
57
- unsigned: redirect_to->login_users_path
57
+ unsigned: redirect_to->login_user_path
58
58
  users:
59
59
  login:
60
60
  ope: redirect_to->root_path
@@ -63,9 +63,6 @@ tools:
63
63
  default:
64
64
  customer: raise->Routing Error
65
65
  unsigned: redirect_to->/tools/login
66
- login:
67
- ope: redirect_to->tools_path
68
- customer: raise->Other Error
69
66
  ```
70
67
 
71
68
  The basic format for this permission schema is like
@@ -1,3 +1,3 @@
1
1
  module EasyLogin
2
- VERSION = "1.3.0"
2
+ VERSION = "1.3.1"
3
3
  end
@@ -1,7 +1,28 @@
1
+ # Declare a redirect schema for differenct user accessing differect controller and action here
2
+ #
3
+ # The basic format for this permission schema is like
4
+ # controller:
5
+ # action:
6
+ # user_role1: pass
7
+ # user_role2: redirect_to->{path}
8
+ # user_role3: raise->{message}
9
+ #
10
+ # The user_role if the role attribute of your user model configed in config/application.rb or config/environments/*.rb
11
+ #
12
+ # The action has 3 types
13
+ # pass --> run the logic in action normally
14
+ # redirect_to --> redirect to other {path}, {path} also has two types, {xxx_path} means using rails routing method, and {other format} means used as absolute url string
15
+ # raise --> raise a 404 response with {message}
16
+ #
17
+ # If the schema was not defined in controller/action/user_role, the schema in controller/default/user_role will be used.
18
+ # Also, if it was not defined in controller/default/user_role, default/user_role will be used.
19
+ # If still default/user_role could not be found, easylogin will do action same as 'pass'
20
+ #
21
+ #
1
22
  default:
2
23
  ope: pass
3
24
  customer: pass
4
- unsigned: redirect_to->login_users_path
25
+ unsigned: redirect_to->login_user_path
5
26
  users:
6
27
  login:
7
28
  ope: redirect_to->root_path
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easy_login
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - goshan