releaf-permissions 2.1.2 → 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
  SHA256:
3
- metadata.gz: 377558e18e84941c82966437a3b4579e8f394a500ea4bb1305d46b646f74e25e
4
- data.tar.gz: a96e27ff24c657b4d15fcc6895b450b70bcc65684c7169a33af982fefaf8c446
3
+ metadata.gz: e43c1918aca4c4bf46565c585d19ef8a87f898c12a4888f5cb8be8eb49ccdf40
4
+ data.tar.gz: 1540dc0ae6ee0156661d6bad652ef78ed174b2b765736b59fb89e915bee7e199
5
5
  SHA512:
6
- metadata.gz: f0232e12958d869feaf99e3814867f8374a356b4f49019df73b1346dbe254c0c6809c41bb0c17195f2c903aafb2c7c3a0383771005805fbc383c8e2fae8105a7
7
- data.tar.gz: 271549d0755d34b369c3696cf30b706972d57d0dcf199d73f6e098a3a1a6e8d92bcf75bcde0cf47857bdb1178ec539f21929f2f28c6f11004444cbf85b8891d1
6
+ metadata.gz: c972832abc8df5e6a94b3b6a2faac2ae911d2dcbfc365974f66565e9061eb279871fd953c2b1852d4b6273c5e456f21a37747f862655f8a923d84e8fb0e815eb
7
+ data.tar.gz: 85013fd68ccc33de35248872cde74217c5c2dd979b8d39fd72799a2c308d478212bc5f98a55f87b6bd7316999161a08f264170d62135b3a4d370a407a2791b62
@@ -2,9 +2,6 @@ module Releaf::Permissions
2
2
  class User < ActiveRecord::Base
3
3
  self.table_name = 'releaf_users'
4
4
 
5
- # store UI settings with RailsSettings
6
- include RailsSettings::Extend
7
-
8
5
  # Include default devise modules. Others available are:
9
6
  # :token_authenticatable, :confirmable,
10
7
  # :lockable, :timeoutable and :omniauthable
@@ -3,7 +3,6 @@ require 'devise'
3
3
  module Releaf::Permissions
4
4
  require 'releaf/permissions/engine'
5
5
  require 'releaf/permissions/default_controller_resolver'
6
- require 'releaf/permissions/settings_manager'
7
6
  require 'releaf/permissions/configuration'
8
7
  require 'releaf/permissions/layout'
9
8
  require 'releaf/permissions/access_control'
@@ -15,7 +14,6 @@ module Releaf::Permissions
15
14
  def self.components
16
15
  [
17
16
  Releaf::Permissions::DefaultControllerResolver,
18
- Releaf::Permissions::SettingsManager,
19
17
  Releaf::Permissions::Configuration,
20
18
  Releaf::Permissions::Layout,
21
19
  Releaf::Permissions::AccessControl,
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: releaf-permissions
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.2
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - CubeSystems
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-19 00:00:00.000000000 Z
11
+ date: 2022-03-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: releaf-core
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 2.1.2
19
+ version: 2.2.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 2.1.2
26
+ version: 2.2.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: devise
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -72,7 +72,6 @@ files:
72
72
  - lib/releaf/permissions/layout.rb
73
73
  - lib/releaf/permissions/profile.rb
74
74
  - lib/releaf/permissions/roles.rb
75
- - lib/releaf/permissions/settings_manager.rb
76
75
  - lib/releaf/permissions/users.rb
77
76
  homepage: https://github.com/cubesystems/releaf
78
77
  licenses:
@@ -93,7 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
93
92
  - !ruby/object:Gem::Version
94
93
  version: '0'
95
94
  requirements: []
96
- rubygems_version: 3.2.6
95
+ rubygems_version: 3.3.7
97
96
  signing_key:
98
97
  specification_version: 4
99
98
  summary: Built-in admin and role support for releaf
@@ -1,22 +0,0 @@
1
- module Releaf::Permissions
2
- class SettingsManager
3
- def self.configure_component
4
- Releaf.application.config.settings_manager = self
5
- end
6
-
7
- def self.read(controller:, key:)
8
- controller.user.settings[key] if controller.respond_to? :user
9
- end
10
-
11
- def self.write(controller:, key:, value:)
12
- # Sometimes concurrency happens, so lets try until
13
- # record get updated
14
- begin
15
- controller.user.settings[key] = value
16
- rescue ActiveRecord::RecordNotUnique
17
- retry
18
- end
19
- end
20
- end
21
- end
22
-