easy_login 1.3.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -4
- data/lib/easy_login/version.rb +1 -1
- data/lib/generators/templates/http_permissions.yml +22 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 90c1b0dfb4a988eb8730d3e2d5eb629c27f3204f
|
4
|
+
data.tar.gz: 65b1f32113d62cbb1969aab015a08f72f906105d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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->
|
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
|
data/lib/easy_login/version.rb
CHANGED
@@ -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->
|
25
|
+
unsigned: redirect_to->login_user_path
|
5
26
|
users:
|
6
27
|
login:
|
7
28
|
ope: redirect_to->root_path
|