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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9fce5e510645f3493cf276a8100fa542a2dcbcc8b2ce98480197b151f36c1b9a
4
- data.tar.gz: 874991fd47333d5fdc17471a77ad321015883a5fcb9d4f26f245c8a20218c9c8
3
+ metadata.gz: 032ec12800d859266098b83a96fff9a6a4d35182e9a2a26f91cf80e92fbf8102
4
+ data.tar.gz: f0a74abb52b4c4e330b329fe0d2fb922e5fa67d9b1bee14cc33d56ddeea8e743
5
5
  SHA512:
6
- metadata.gz: 8ef3e529b3cb64545c470c731d8938c9a9fd5eb5da50ea0b0da964597a82234fa133f571d84b5de9920eeefc5589fde6f98406126b8d15b8e9313c915c31707d
7
- data.tar.gz: 130816f85dea541bbbd086c2241e6716ab3d95b141dbf65f7eeb4ec07e9b67d65d3218c0d2daad4bb8611a61771ea971e925b143d6dc151cb88cff071fb1becf
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 accessible_organizations
71
- permissions.accessible_organizations.map do |org|
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 has_accessible_organizations?
77
- accessible_organizations.present?
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
- accessible_organizations.first
89
+ student_granted_organizations.first
82
90
  end
83
91
 
84
92
  def has_main_organization?
85
- accessible_organizations.length == 1
93
+ student_granted_organizations.length == 1
86
94
  end
87
95
 
88
96
  def has_immersive_main_organization?
@@ -1,5 +1,5 @@
1
1
  module Mumukit
2
2
  module Platform
3
- VERSION = '3.1.0'
3
+ VERSION = '3.2.0'
4
4
  end
5
5
  end
@@ -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.0'
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.1.0
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: 2018-11-30 00:00:00.000000000 Z
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.0'
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.0'
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
- rubyforge_project:
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