mumuki-domain 8.1.0 → 8.1.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: 9075756cb0cd46b955959afe62c837fb11a293cf520f7e7a3e0666c88e9bc014
4
- data.tar.gz: a775162a5319a08a2a2953586bd59efd3cca7ebffddb9c72b236175c5dcbb1a8
3
+ metadata.gz: cd4418eebed893926b600b43b22080be43205ef4b857e16df1be7e50ea625e9b
4
+ data.tar.gz: 69d81e7072172101767cc3655cfad7bafdcf9fc726c3438432a9777792e744c0
5
5
  SHA512:
6
- metadata.gz: '08190f559ca10836c7d2cfd9c98a864ea18d31fb1f13115727ffc9738a7913fe4af136571b0036c1701b166162e61d2d726653a0cb8f3f1711f9677bde815e03'
7
- data.tar.gz: ed6f365ac0c552ccd2f5136fd825052b51da29846a6ea042d27a57e991008d5cfe02265a5450eb2a9b62756ddfb96300c5be1f47dd699b26a8d47b57883c3758
6
+ metadata.gz: d28c8e9e981e2669f11a5f581f25639c318df1dc17bdf1c94bcd127010426f2b846ff801f7ee2362941f2fb42ea188a36694b91add542555085f5d363603cc11
7
+ data.tar.gz: 2e95982034e482f748425c8445791349b5eb9c206a962b6620aea4412d4ef01a17ecf2d79ac0ca12cca75a458a51e0f4ce671951213ac434381475592e235ac2
@@ -240,7 +240,7 @@ class Exercise < ApplicationRecord
240
240
  end
241
241
 
242
242
  def reading?
243
- is_a? Reading
243
+ is_a? ::Reading
244
244
  end
245
245
 
246
246
  private
@@ -182,7 +182,7 @@ class User < ApplicationRecord
182
182
  # This is true only when this organization has the forum enabled and the user
183
183
  # has the discusser pseudo-permission and the discusser is trusted
184
184
  def can_discuss_in?(organization)
185
- organization.forum_enabled? && discusser_of?(organization) && trusted_as_discusser_in?(organization)
185
+ organization.forum_enabled? && discusser_of?(organization) && trusted_as_discusser_in?(organization) && !banned_from_forum?
186
186
  end
187
187
 
188
188
  def trusted_as_discusser_in?(organization)
@@ -0,0 +1,5 @@
1
+ class AddBannedFromForumToUsers < ActiveRecord::Migration[5.1]
2
+ def change
3
+ add_column :users, :banned_from_forum, :boolean
4
+ end
5
+ end
@@ -1,5 +1,5 @@
1
1
  module Mumuki
2
2
  module Domain
3
- VERSION = '8.1.0'
3
+ VERSION = '8.1.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: 8.1.0
4
+ version: 8.1.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: 2020-11-26 00:00:00.000000000 Z
11
+ date: 2020-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -636,6 +636,7 @@ files:
636
636
  - db/migrate/20201026225312_add_organization_wins_page_flag.rb
637
637
  - db/migrate/20201027134205_add_immersible_to_organization.rb
638
638
  - db/migrate/20201027152806_create_terms.rb
639
+ - db/migrate/20201130163114_add_banned_from_forum_to_users.rb
639
640
  - lib/mumuki/domain.rb
640
641
  - lib/mumuki/domain/area.rb
641
642
  - lib/mumuki/domain/engine.rb
@@ -756,7 +757,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
756
757
  - !ruby/object:Gem::Version
757
758
  version: '0'
758
759
  requirements: []
759
- rubygems_version: 3.0.8
760
+ rubygems_version: 3.1.2
760
761
  signing_key:
761
762
  specification_version: 4
762
763
  summary: Mumuki Platform's Domain Model