semaphore
789 of 875 relevant lines covered (90.17%)
109.65 hits per line
1 |
class ShfDocumentPolicy < ApplicationPolicy |
1✔ |
2 |
|
|
3 |
|
|
4 |
def index? |
1✔ |
5 |
@user.is_member_or_admin? if @user |
37✔ |
6 |
end
|
|
7 |
|
|
8 |
def update? |
1✔ |
9 |
is_admin? |
40✔ |
10 |
end
|
|
11 |
|
|
12 |
|
|
13 |
def show? |
1✔ |
14 |
is_admin? |
26✔ |
15 |
end
|
|
16 |
|
|
17 |
def contents_show? |
1✔ |
18 |
index? |
4✔ |
19 |
end
|
|
20 |
|
|
21 |
def contents_edit? |
1✔ |
22 |
update? |
2✔ |
23 |
end
|
|
24 |
|
|
25 |
def contents_update? |
1✔ |
26 |
update? |
6✔ |
27 |
end
|
|
28 |
|
|
29 |
def new? |
1✔ |
30 |
create? |
23✔ |
31 |
end
|
|
32 |
|
|
33 |
|
|
34 |
def create? |
1✔ |
35 |
is_admin? |
43✔ |
36 |
end
|
|
37 |
|
|
38 |
def minutes_and_static_pages? |
1✔ |
39 |
index? |
× |
40 |
end
|
|
41 |
|
|
42 |
end
|