devise_roles 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/devise_roles/version.rb +1 -1
- data/lib/devise_roles.rb +2 -2
- 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: 79a3613be0a729ab293304a632bde8c20038f0ec
|
4
|
+
data.tar.gz: 25b92ad23f1058cfd11f4d1cf0868dca1fd1baff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9bb000ad737400805596a7e6bba88072bf27f4ecba5d67134575559cbbd4f79229d903388257feea505292bca5aa906d51a47fd451d0f2754d1b1e5a8c2f2710
|
7
|
+
data.tar.gz: cd78fb076ab6d0755da5eb433bc9d404d8be519e42100a29029c03c309707948c72ddae080b558714f4c97ede756f0291fa7824ffa3e164deb1b2f094e6c502b
|
data/lib/devise_roles/version.rb
CHANGED
data/lib/devise_roles.rb
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
require "devise_roles/version"
|
2
2
|
|
3
|
-
|
3
|
+
class DeviseRoles
|
4
4
|
def available_for_user_role(user_role_name, user_redirect_path)
|
5
5
|
if current_user.role.name != user_role_name
|
6
6
|
redirect_to admin_path, alert: "You should be #{user_role_name} to view that page!"
|
7
7
|
end
|
8
8
|
end
|
9
9
|
|
10
|
-
|
10
|
+
|
11
11
|
end
|