mumuki-domain 9.18.0 → 9.19.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/assignment.rb +4 -0
- data/app/models/concerns/organization/status/in_preparation.rb +1 -1
- data/app/models/exam.rb +4 -0
- data/app/models/organization_access_mode/read_only.rb +1 -1
- data/app/models/user.rb +2 -2
- data/lib/mumuki/domain/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bcb85dd95292fca604bdfd6f77560b37650766ede8bfbf1b7afe9caf4a105efd
|
4
|
+
data.tar.gz: ed1292935f907bde74fe777fd48de3d61ef87c5f62e6db4c3c7c0ae50c5ce3de
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fcc442e31b9f5b510c8a5a99d78bcbd98b8a0f36b828badeb64e25e8eaeecb3d910c7348da4b263047f52e5c6bd9ad6ee8412cfcfdf932cee5418a2ee48cfb7c
|
7
|
+
data.tar.gz: 6f888100f4dc2b1f9c332c3f8b9ebc257c1eb3aa2534c7db85bd0b4f4328f9fc2cd24f8da23ecbd04bb1dab8edd56ad236dac2dd6505ea8451ee5c5b6212c570
|
data/app/models/assignment.rb
CHANGED
@@ -9,7 +9,7 @@ class Organization::Status::InPreparation < Organization::Status::Base
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def ex_student_access_mode(user)
|
12
|
-
OrganizationAccessMode::
|
12
|
+
OrganizationAccessMode::ReadOnly.new user, organization, :faqs, :profile
|
13
13
|
end
|
14
14
|
|
15
15
|
def outsider_access_mode(user)
|
data/app/models/exam.rb
CHANGED
@@ -17,7 +17,7 @@ class OrganizationAccessMode::ReadOnly < OrganizationAccessMode::Base
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def validate_discuss_here!(discussion)
|
20
|
-
super(discussion) unless discussion&.initiator == user
|
20
|
+
super(discussion) unless discuss_here? && discussion&.initiator == user
|
21
21
|
end
|
22
22
|
|
23
23
|
def show_content?(content)
|
data/app/models/user.rb
CHANGED
@@ -157,8 +157,8 @@ class User < ApplicationRecord
|
|
157
157
|
save_and_notify!
|
158
158
|
end
|
159
159
|
|
160
|
-
def detach!(role, course)
|
161
|
-
make_ex_student_of! course.slug if student_of?(course.slug) && solved_any_exercises?(course.organization)
|
160
|
+
def detach!(role, course, deep: false)
|
161
|
+
make_ex_student_of! course.slug if !deep && student_of?(course.slug) && solved_any_exercises?(course.organization)
|
162
162
|
remove_permission! role, course.slug
|
163
163
|
save_and_notify!
|
164
164
|
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: 9.
|
4
|
+
version: 9.19.0
|
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: 2021-
|
11
|
+
date: 2021-10-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|