mumuki-domain 9.14.0 → 9.14.1

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: 91e234afff822bf8ff746f174c941942d6a5d90d2b285e1613f4a739f13e7df6
4
- data.tar.gz: d14adec7ec240db3d6aeff97d2ea7c05cf6dd72134a0118a5a2141c8d97e8215
3
+ metadata.gz: b312037c43def7204d8591702f2002340539b6f66df217e4bf8b35e5a0392785
4
+ data.tar.gz: f417d2c02346fcd6e2460c246d38f0a9c4eb1ac8a5162bf72bbe00f983326bec
5
5
  SHA512:
6
- metadata.gz: 916afc62518c9ad05a8bd182f56f13b926584652bdc45ee11d267114cf1207b35bd267cccab98d3dffe0df8da200f44937732d8173677869794fb0ea3fa7aaf4
7
- data.tar.gz: a0c2e513345ace615a0532c0f9443cc236f33ec1a17aa5177212162a1b1387353d5167f48641ecd2051e5e1f71b651bd454125976615882127a2ba6dd876d4bf
6
+ metadata.gz: 5786a0b215fee7332099994a47e13b24d2f8a66647ede57aaa67bdcdd2e77433e471d8dc5f7ef48369bea06fb2636f900ed365d24b3b1549f0cef3c48d316f25
7
+ data.tar.gz: 282e425ad11463f7c0945b323327f17addc7997e60f191a034b07317907e0156918fcd667786f4905b89682abe9bb2090148fab392aebd9f99c6c0ab1320be2b
@@ -19,4 +19,8 @@ class Organization::Status::Base
19
19
  outsider_access_mode(user)
20
20
  end
21
21
  end
22
+
23
+ def validate!(user = nil)
24
+ validate_enabled! unless user
25
+ end
22
26
  end
@@ -20,9 +20,8 @@ class Organization::Status::Disabled < Organization::Status::Base
20
20
  end
21
21
  end
22
22
 
23
- def validate!(user = nil)
24
- raise Mumuki::Domain::DisabledOrganizationError unless user
23
+ def validate_enabled!
24
+ raise Mumuki::Domain::DisabledOrganizationError
25
25
  end
26
-
27
26
  end
28
27
 
@@ -20,7 +20,6 @@ class Organization::Status::Enabled < Organization::Status::Base
20
20
  end
21
21
  end
22
22
 
23
- def validate!(_user = nil)
23
+ def validate_enabled!
24
24
  end
25
-
26
25
  end
@@ -20,8 +20,7 @@ class Organization::Status::InPreparation < Organization::Status::Base
20
20
  end
21
21
  end
22
22
 
23
- def validate!(user = nil)
24
- raise Mumuki::Domain::UnpreparedOrganizationError unless user
23
+ def validate_enabled!
24
+ raise Mumuki::Domain::UnpreparedOrganizationError
25
25
  end
26
-
27
26
  end
@@ -1,13 +1,11 @@
1
1
  module WithOrganizationStatus
2
2
 
3
+ delegate :validate_enabled!, :access_mode, to: :status
4
+
3
5
  def status
4
6
  @status ||= _status
5
7
  end
6
8
 
7
- def access_mode(user)
8
- status.access_mode(user)
9
- end
10
-
11
9
  def validate_active!
12
10
  status.validate!
13
11
  end
@@ -1,5 +1,5 @@
1
1
  module Mumuki
2
2
  module Domain
3
- VERSION = '9.14.0'
3
+ VERSION = '9.14.1'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mumuki-domain
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.14.0
4
+ version: 9.14.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Franco Leonardo Bulgarelli
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-02 00:00:00.000000000 Z
11
+ date: 2021-09-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails