thecore_print_commons 2.0.1 → 2.0.2
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c4065a9ec93426a47e373bcf57a49377e25323430e7996b67276952bae77d563
|
4
|
+
data.tar.gz: 2e18356d5b692897f63cf0c14f641752c266b2251129671e17ccd5c94eaddc40
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 84829069ec99268d25686bc3370c12d0d3c0f32ac432d03cbf3d2ebdbb42307abfe13e5d6f9c6a480d02022c00d7da1a56bbbf2eeccccd3b916fbe58fc84e543
|
7
|
+
data.tar.gz: 31ac6d8c77d4bce88e26f8fde0489878ce208fe3d59131859fdbef66bf01b221b5d1fbdd3608252fd2655e9935051e0df2b52920d4c899c189ee74521569bf8d
|
@@ -1,10 +1,7 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
extend ActiveSupport::Concern
|
6
|
-
included do
|
7
|
-
def thecore_print_commons_abilities user
|
1
|
+
module Abilities
|
2
|
+
class ThecorePrintCommon
|
3
|
+
include CanCan::Ability
|
4
|
+
def initialize user
|
8
5
|
if user
|
9
6
|
# if the user is logged in, it can do certain tasks regardless his role
|
10
7
|
if user.admin?
|
@@ -19,5 +16,5 @@ module ThecorePrintCommonAbilitiesConcern
|
|
19
16
|
end
|
20
17
|
end
|
21
18
|
|
22
|
-
# include the extension
|
23
|
-
TheCoreAbilities.send(:include, ThecorePrintCommonAbilitiesConcern)
|
19
|
+
# # include the extension
|
20
|
+
# TheCoreAbilities.send(:include, ThecorePrintCommonAbilitiesConcern)
|