mumuki-domain 6.6.0 → 6.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/models/organization.rb +3 -3
- data/lib/mumuki/domain/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4ccf761c5b469ba65886d7d672d9008f1c6fe1dd8d46284f57c61bd95ed6ab6c
|
|
4
|
+
data.tar.gz: d2f88a156f28f15a26180ecb8744ec0d64bc55202eeff8167bec1843682b1667
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c5218f2f513870bca9ec4f0a2dd79fa368b7ce8ee67012cc8eca6a59010493964b5cb99db6d66a82ea5f7de52cd00801d757d8354f2ca061f1756f5799fda369
|
|
7
|
+
data.tar.gz: 115ac23ec78d20e9949dc85a218b9c702c5938e4259c1b4c217ac2b4ccfb5499562ef89175bcd768f4f37cb2775e273f6f30b65431f6cdf252c4a47bca06e9f9
|
data/app/models/organization.rb
CHANGED
|
@@ -99,7 +99,7 @@ class Organization < ApplicationRecord
|
|
|
99
99
|
# ask for help in this organization
|
|
100
100
|
#
|
|
101
101
|
# Warning: this method does not strictly check user's permission
|
|
102
|
-
def ask_for_help_enabled?(user)
|
|
102
|
+
def ask_for_help_enabled?(user = nil)
|
|
103
103
|
report_issue_enabled? || community_link.present? || can_create_discussions?(user)
|
|
104
104
|
end
|
|
105
105
|
|
|
@@ -108,8 +108,8 @@ class Organization < ApplicationRecord
|
|
|
108
108
|
#
|
|
109
109
|
# This is true only when this organization has a forum and the user
|
|
110
110
|
# has the discusser pseudo-permission
|
|
111
|
-
def can_create_discussions?(user)
|
|
112
|
-
forum_enabled? && user.discusser_of?(self)
|
|
111
|
+
def can_create_discussions?(user = nil)
|
|
112
|
+
forum_enabled? && (!user || user.discusser_of?(self))
|
|
113
113
|
end
|
|
114
114
|
|
|
115
115
|
def import_from_resource_h!(resource_h)
|