mumukit-platform 4.0.0 → 4.1.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e249892bfa851c6d0a8bf033c1d768452b968f019d27857fc9277ae24a0b2250
|
4
|
+
data.tar.gz: 7e31fe679b7dcb8e50fd5d47e874268752240755552baec0446411ebcbab7204
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5497d47595b8b810f112759f2fd732240245dc151c1702bd504e6df9c454095925b34e15cf18d7c539bacc15c731f3f8e96e37847e85cb2de66a25aa2e28005c
|
7
|
+
data.tar.gz: e2eac480aeb4b9f381c110046a3eb3f9940a210dd19624c1fae2ed7eb4d8b527995c9fd505d66d770b08f3de49926abec9fd01f98a2c664c2a168986c14acb48
|
@@ -12,6 +12,10 @@ module Mumukit::Platform::Organization
|
|
12
12
|
Thread.current[:organization] || raise('organization not selected')
|
13
13
|
end
|
14
14
|
|
15
|
+
def self.current?
|
16
|
+
!!Thread.current[:organization]
|
17
|
+
end
|
18
|
+
|
15
19
|
def self.current_locale
|
16
20
|
Thread.current[:organization]&.locale || 'en'
|
17
21
|
end
|
@@ -2,6 +2,8 @@ module Mumukit::Platform::User::Helpers
|
|
2
2
|
include Mumukit::Auth::Roles
|
3
3
|
include Mumukit::Platform::Notifiable
|
4
4
|
|
5
|
+
extend Gem::Deprecate
|
6
|
+
|
5
7
|
## Implementors must declare the following methods:
|
6
8
|
#
|
7
9
|
# * permissions
|
@@ -67,22 +69,28 @@ module Mumukit::Platform::User::Helpers
|
|
67
69
|
|
68
70
|
## Accesible organizations
|
69
71
|
|
70
|
-
def
|
71
|
-
permissions.
|
72
|
+
def student_granted_organizations
|
73
|
+
permissions.student_granted_organizations.map do |org|
|
72
74
|
Mumukit::Platform::Organization.find_by_name!(org) rescue nil
|
73
75
|
end.compact
|
74
76
|
end
|
75
77
|
|
76
|
-
def
|
77
|
-
|
78
|
+
def has_student_granted_organizations?
|
79
|
+
student_granted_organizations.present?
|
80
|
+
end
|
81
|
+
|
82
|
+
[[:accessible_organizations, :student_granted_organizations],
|
83
|
+
[:has_accessible_organizations?, :has_student_granted_organizations?]].each do |it, replacement|
|
84
|
+
alias_method it, replacement
|
85
|
+
deprecate it, replacement, 2019, 6
|
78
86
|
end
|
79
87
|
|
80
88
|
def main_organization
|
81
|
-
|
89
|
+
student_granted_organizations.first
|
82
90
|
end
|
83
91
|
|
84
92
|
def has_main_organization?
|
85
|
-
|
93
|
+
student_granted_organizations.length == 1
|
86
94
|
end
|
87
95
|
|
88
96
|
def has_immersive_main_organization?
|
data/mumukit-platform.gemspec
CHANGED
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
|
|
23
23
|
|
24
24
|
spec.add_dependency 'mumukit-nuntius', '~> 6.0'
|
25
25
|
spec.add_dependency 'mumukit-core', '~> 1.2'
|
26
|
-
spec.add_dependency 'mumukit-auth', '~> 7.
|
26
|
+
spec.add_dependency 'mumukit-auth', '~> 7.6'
|
27
27
|
spec.add_dependency 'mumukit-bridge', '~> 3.5'
|
28
28
|
spec.add_dependency 'activemodel', '>= 4.0'
|
29
29
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mumukit-platform
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Franco Leonardo Bulgarelli
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-03-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mumukit-nuntius
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '7.
|
47
|
+
version: '7.6'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '7.
|
54
|
+
version: '7.6'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: mumukit-bridge
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -184,8 +184,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
184
184
|
- !ruby/object:Gem::Version
|
185
185
|
version: '0'
|
186
186
|
requirements: []
|
187
|
-
|
188
|
-
rubygems_version: 2.7.8
|
187
|
+
rubygems_version: 3.0.3
|
189
188
|
signing_key:
|
190
189
|
specification_version: 4
|
191
190
|
summary: Shared Mumuki Platform Components
|