UNCOV
1
|
class Authority |
× |
UNCOV
2
|
attr_reader :current_user
|
× |
3 |
|
|
UNCOV
4
|
def initialize(args = {}) |
× |
UNCOV
5
|
@current_user = args[:current_user] |
× |
UNCOV
6
|
end
|
× |
7 |
|
|
UNCOV
8
|
def allow?(controller, _action) |
× |
UNCOV
9
|
return true if current_user && current_user.admin? |
× |
10 |
|
|
UNCOV
11
|
case controller
|
× |
UNCOV
12
|
when 'pages' |
× |
UNCOV
13
|
true
|
× |
UNCOV
14
|
end
|
× |
UNCOV
15
|
end
|
× |
UNCOV
16
|
end
|
× |