enju_message 0.1.14.pre4 → 0.1.14.pre5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/enju_message/ability.rb +4 -4
- data/app/views/message_templates/index.html.erb +1 -1
- data/app/views/messages/show.html.erb +1 -1
- data/lib/enju_message/version.rb +1 -1
- data/spec/dummy/app/models/ability.rb +4 -4
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/solr/data/test/index/{_1z.fdt → _2f.fdt} +0 -0
- data/spec/dummy/solr/data/test/index/{_1z.fdx → _2f.fdx} +0 -0
- data/spec/dummy/solr/data/test/index/{_1z.fnm → _2f.fnm} +0 -0
- data/spec/dummy/solr/data/test/index/{_1z.frq → _2f.frq} +0 -0
- data/spec/dummy/solr/data/test/index/{_1z.nrm → _2f.nrm} +0 -0
- data/spec/dummy/solr/data/test/index/{_1z.prx → _2f.prx} +0 -0
- data/spec/dummy/solr/data/test/index/{_1z.tii → _2f.tii} +0 -0
- data/spec/dummy/solr/data/test/index/{_1z.tis → _2f.tis} +0 -0
- data/spec/dummy/solr/data/test/index/segments.gen +0 -0
- data/spec/dummy/solr/data/test/index/{segments_41 → segments_4x} +0 -0
- metadata +19 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c04c804795763d2becd15270ff5e5f9380a728ee
|
4
|
+
data.tar.gz: 9a2a3e651b3038e5e94323ea697ad980b0ed94c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6647e1a50929259696f2743ee95aff21ddd882aca0b4a057e0c4a8764403db24ed13fbe6f060ec539b49becbeedf97bd78438741da76e864d15c9eada9adc0ec
|
7
|
+
data.tar.gz: f9d1e3bb737ad18779b253ef1f7c56cc92e03418356b8d475008673b5fd0b9b3586966e496fafcdae3cfc831ebd7669181623c8d8c6d1fc1708107d6ba147cfd
|
@@ -6,20 +6,20 @@ module EnjuMessage
|
|
6
6
|
case user.try(:role).try(:name)
|
7
7
|
when 'Administrator'
|
8
8
|
can :manage, Message
|
9
|
-
can [:read, :update, :destroy], MessageRequest
|
9
|
+
can [:read, :update, :destroy, :delete], MessageRequest
|
10
10
|
can [:read, :update], MessageTemplate
|
11
11
|
when 'Librarian'
|
12
12
|
can [:index, :create], Message
|
13
13
|
can [:update], Message do |message|
|
14
14
|
message.sender == user
|
15
15
|
end
|
16
|
-
can [:show, :destroy], Message do |message|
|
16
|
+
can [:show, :destroy, :delete], Message do |message|
|
17
17
|
message.receiver == user
|
18
18
|
end
|
19
|
-
can [:read, :update, :destroy], MessageRequest
|
19
|
+
can [:read, :update, :destroy, :delete], MessageRequest
|
20
20
|
can :read, MessageTemplate
|
21
21
|
when 'User'
|
22
|
-
can [:read, :destroy], Message do |message|
|
22
|
+
can [:read, :destroy, :delete], Message do |message|
|
23
23
|
message.receiver == user
|
24
24
|
end
|
25
25
|
can :index, Message
|
@@ -25,7 +25,7 @@
|
|
25
25
|
<%- if can? :update, message_template -%>
|
26
26
|
<%= link_to t('page.edit'), edit_message_template_path(message_template) -%>
|
27
27
|
<% end %>
|
28
|
-
<%- if can? :
|
28
|
+
<%- if can? :delete, message_template -%>
|
29
29
|
<%= link_to t('page.destroy'), message_template, :data => {:confirm => t('page.are_you_sure')}, :method => :delete -%>
|
30
30
|
<%- end -%>
|
31
31
|
</td>
|
@@ -41,7 +41,7 @@
|
|
41
41
|
<li><%= link_to t('page.listing', :model => t('activerecord.models.message')), messages_path -%></li>
|
42
42
|
<% end %>
|
43
43
|
<li><%= link_to t('message.reply'), new_message_path(:parent_id => @message.id) -%></li>
|
44
|
-
<% if can? :
|
44
|
+
<% if can? :delete, :message %>
|
45
45
|
<li><%= link_to t('page.destroy'), @message, :data => {:confirm => t('page.are_you_sure')}, :method => :delete -%></li>
|
46
46
|
<% end %>
|
47
47
|
</ul>
|
data/lib/enju_message/version.rb
CHANGED
@@ -6,20 +6,20 @@
|
|
6
6
|
case user.try(:role).try(:name)
|
7
7
|
when 'Administrator'
|
8
8
|
can :manage, Message
|
9
|
-
can [:read, :update, :destroy], MessageRequest
|
9
|
+
can [:read, :update, :destroy, :delete], MessageRequest
|
10
10
|
can [:read, :update], MessageTemplate
|
11
11
|
when 'Librarian'
|
12
12
|
can [:index, :create], Message
|
13
13
|
can [:update], Message do |message|
|
14
14
|
message.sender == user
|
15
15
|
end
|
16
|
-
can [:show, :destroy], Message do |message|
|
16
|
+
can [:show, :destroy, :delete], Message do |message|
|
17
17
|
message.receiver == user
|
18
18
|
end
|
19
|
-
can [:read, :update, :destroy], MessageRequest
|
19
|
+
can [:read, :update, [:destroy, :delete]], MessageRequest
|
20
20
|
can :read, MessageTemplate
|
21
21
|
when 'User'
|
22
|
-
can [:read, :destroy], Message do |message|
|
22
|
+
can [:read, :destroy, :delete], Message do |message|
|
23
23
|
message.receiver == user
|
24
24
|
end
|
25
25
|
can :index, Message
|
data/spec/dummy/db/test.sqlite3
CHANGED
Binary file
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
Binary file
|
Binary file
|
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: enju_message
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.14.
|
4
|
+
version: 0.1.14.pre5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kosuke Tanabe
|
@@ -296,16 +296,16 @@ files:
|
|
296
296
|
- spec/dummy/solr/conf/spellings.txt
|
297
297
|
- spec/dummy/solr/conf/stopwords.txt
|
298
298
|
- spec/dummy/solr/conf/synonyms.txt
|
299
|
-
- spec/dummy/solr/data/test/index/
|
300
|
-
- spec/dummy/solr/data/test/index/
|
301
|
-
- spec/dummy/solr/data/test/index/
|
302
|
-
- spec/dummy/solr/data/test/index/
|
303
|
-
- spec/dummy/solr/data/test/index/
|
304
|
-
- spec/dummy/solr/data/test/index/
|
305
|
-
- spec/dummy/solr/data/test/index/
|
306
|
-
- spec/dummy/solr/data/test/index/
|
299
|
+
- spec/dummy/solr/data/test/index/_2f.fdt
|
300
|
+
- spec/dummy/solr/data/test/index/_2f.fdx
|
301
|
+
- spec/dummy/solr/data/test/index/_2f.fnm
|
302
|
+
- spec/dummy/solr/data/test/index/_2f.frq
|
303
|
+
- spec/dummy/solr/data/test/index/_2f.nrm
|
304
|
+
- spec/dummy/solr/data/test/index/_2f.prx
|
305
|
+
- spec/dummy/solr/data/test/index/_2f.tii
|
306
|
+
- spec/dummy/solr/data/test/index/_2f.tis
|
307
307
|
- spec/dummy/solr/data/test/index/segments.gen
|
308
|
-
- spec/dummy/solr/data/test/index/
|
308
|
+
- spec/dummy/solr/data/test/index/segments_4x
|
309
309
|
- spec/dummy/solr/data/test/spellchecker/segments.gen
|
310
310
|
- spec/dummy/solr/data/test/spellchecker/segments_1
|
311
311
|
- spec/factories/message.rb
|
@@ -431,16 +431,16 @@ test_files:
|
|
431
431
|
- spec/dummy/solr/conf/spellings.txt
|
432
432
|
- spec/dummy/solr/conf/stopwords.txt
|
433
433
|
- spec/dummy/solr/conf/synonyms.txt
|
434
|
-
- spec/dummy/solr/data/test/index/
|
435
|
-
- spec/dummy/solr/data/test/index/
|
436
|
-
- spec/dummy/solr/data/test/index/
|
437
|
-
- spec/dummy/solr/data/test/index/
|
438
|
-
- spec/dummy/solr/data/test/index/
|
439
|
-
- spec/dummy/solr/data/test/index/
|
440
|
-
- spec/dummy/solr/data/test/index/
|
441
|
-
- spec/dummy/solr/data/test/index/
|
434
|
+
- spec/dummy/solr/data/test/index/_2f.fdt
|
435
|
+
- spec/dummy/solr/data/test/index/_2f.fdx
|
436
|
+
- spec/dummy/solr/data/test/index/_2f.fnm
|
437
|
+
- spec/dummy/solr/data/test/index/_2f.frq
|
438
|
+
- spec/dummy/solr/data/test/index/_2f.nrm
|
439
|
+
- spec/dummy/solr/data/test/index/_2f.prx
|
440
|
+
- spec/dummy/solr/data/test/index/_2f.tii
|
441
|
+
- spec/dummy/solr/data/test/index/_2f.tis
|
442
442
|
- spec/dummy/solr/data/test/index/segments.gen
|
443
|
-
- spec/dummy/solr/data/test/index/
|
443
|
+
- spec/dummy/solr/data/test/index/segments_4x
|
444
444
|
- spec/dummy/solr/data/test/spellchecker/segments.gen
|
445
445
|
- spec/dummy/solr/data/test/spellchecker/segments_1
|
446
446
|
- spec/factories/message.rb
|