lato_core 2.1.4 → 2.2.0

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: e84e1a3c8a28df9316934c3a161ceb2a93c54b9e
4
- data.tar.gz: 2e457afe921ef846994250eac55c70c855965704
3
+ metadata.gz: 2bba9533c6d8ca36fccc5d5c43cf5253221c58b2
4
+ data.tar.gz: b778ebd736a83e911c7f44f5fb4737b71a523533
5
5
  SHA512:
6
- metadata.gz: 8f1d70c9e6f0f67352c2dda7047e296810efd91338cfe071d99093c43c24c4956a773afc79b20d09fb3d66efbb22fa6f5f45b7b8c4b1031064dcd3c29ed50be0
7
- data.tar.gz: a5b5e36c574d5f8c822460b82322b161f0f7853a5bbb585d6d73890a91f07f630c4c3d19abbd74df69f480567db835342e518eeee670f0c2cf9f6198504d9a0b
6
+ metadata.gz: 54971b4d53cbfe95c08fdd91e26406957880008b831d162f445c4950464b0ba3da2e16697e35833b024d2848259eff8fe17982a8643a9e018346173288f3d3b1
7
+ data.tar.gz: 0c7ea56aff524d2ec57c07e8075b8d2d762563e0c51cbbbd0c2252bde4c6b0a185693823864de9047bc53c637960ef854f7f44cc0b856242c3b958fe3654c44f
@@ -131,7 +131,7 @@
131
131
  .elements-button__confirmation-content {
132
132
  background-color: $color_white;
133
133
  min-width: 300px;
134
- border-radius: 10px;
134
+ border-radius: 0;
135
135
  text-align: center;
136
136
  box-shadow: 0px 11px 20px rgba(41,59,90,0.08);
137
137
  min-height: 50px;
@@ -2,6 +2,6 @@
2
2
  background: $color_white;
3
3
  padding: 15px;
4
4
  min-width: 400px;
5
- border-radius: 15px;
5
+ border-radius: 0;
6
6
  box-shadow: 0px 11px 20px rgba(41,59,90,0.08);
7
7
  }
data/config/configs.yml CHANGED
@@ -40,7 +40,7 @@ colors:
40
40
  white: '#ffffff'
41
41
  black: '#414a4c'
42
42
  grey: '#ecf0f1'
43
- main: '#34495e'
43
+ main: '#232b2b'
44
44
  active: '#2980b9'
45
45
  danger: '#e74c3c'
46
46
  warning: '#f39c12'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module LatoCore
2
4
 
3
5
  # This module contains a list of functions used to authenticate a superuser.
@@ -23,7 +25,7 @@ module LatoCore
23
25
 
24
26
  # This function check the session for a superuser and set the variable @core__current_superuser.
25
27
  # If session is not valid the user should be redirect to login path.
26
- def core__manage_superuser_session
28
+ def core__manage_superuser_session(permission = nil)
27
29
  decoded_token = core__decode_token(session[:lato_core__superuser_session_token])
28
30
 
29
31
  if decoded_token
@@ -32,10 +34,15 @@ module LatoCore
32
34
  core__destroy_superuser_session
33
35
  redirect_to lato_core.login_path
34
36
  end
37
+
38
+ if permission && @core__current_superuser.permission < permission
39
+ flash[:danger] = 'PERMISSION ERROR'
40
+ redirect_to lato_core.root_path
41
+ end
35
42
  else
36
43
  redirect_to lato_core.login_path
37
44
  end
38
45
  end
39
46
 
40
47
  end
41
- end
48
+ end
@@ -1,3 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module LatoCore
2
- VERSION = '2.1.4'
4
+
5
+ VERSION = '2.2.0'
6
+
3
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lato_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.4
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ideonetwork
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-25 00:00:00.000000000 Z
11
+ date: 2017-11-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails