mumukit-platform 3.1.0 → 3.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mumukit/platform/user/helpers.rb +14 -6
- data/lib/mumukit/platform/version.rb +1 -1
- data/mumukit-platform.gemspec +1 -1
- metadata +5 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 032ec12800d859266098b83a96fff9a6a4d35182e9a2a26f91cf80e92fbf8102
|
4
|
+
data.tar.gz: f0a74abb52b4c4e330b329fe0d2fb922e5fa67d9b1bee14cc33d56ddeea8e743
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f427da93f053a976a91c43d9b6d5db46c736466a976309308df1049415d41dad0e77ec34cbad8a7d9419175a9b11d1d4cebe7922c3d04c23327ff09e0645dcc
|
7
|
+
data.tar.gz: 697a8dbfffe6db844cfae5beb5d74e0f2af4196ac468070de510ff4a1fee3dbbd8d1e94427a079ee32787e45f1f1d92178af3aedbddd4ee89c735047c8b1dec4
|
@@ -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: 3.
|
4
|
+
version: 3.2.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
|