thecore_print_commons 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d586b710ebe136ceeaf15d8139b09110df2af7cd
|
4
|
+
data.tar.gz: c8fa792fb1443c4828f41c65055d8108b8868643
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 064e4319367036679718efb43d824ba3765da93849859f90a6ba74725edbcdd5ef3fc7767bf42d8b042b2f6d0b3dcd1e38661ee019969e3aabb72a5144f4e127
|
7
|
+
data.tar.gz: 0245f765fa2df4988769045fa6cb3a803e173bf53962f896eb3303aa7113f6ec004189028b42aaede825a30593053050691d365a6e9c97aff932c46281c91dff
|
@@ -4,20 +4,19 @@ require 'active_support/concern'
|
|
4
4
|
module ThecorePrintCommonAbilitiesConcern
|
5
5
|
extend ActiveSupport::Concern
|
6
6
|
included do
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
7
|
+
def thecore_print_commons_abilities user
|
8
|
+
if user
|
9
|
+
# if the user is logged in, it can do certain tasks regardless his role
|
10
|
+
if user.admin?
|
11
|
+
# if the user is an admin, it can do a lot of things, usually
|
12
|
+
end
|
13
13
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
14
|
+
if user.has_role? :role
|
15
|
+
# a specific role, brings specific powers
|
16
|
+
end
|
17
|
+
end
|
18
18
|
end
|
19
19
|
end
|
20
|
-
end
|
21
20
|
end
|
22
21
|
|
23
22
|
# include the extension
|