Cross Reference: ssh_access_controller.rb
xref
: /
ontohub
/
app
/
controllers
/
ssh_access_controller.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
ssh_access_controller.rb revision cf2426edf48bf518b18c2a42aa7522fc2761159a
class
SshAccessController
<
InheritedResources
::
Base
belongs_to
:
repository
,
finder
: :
find_by_path
!
def
index
allowed
=
SshAccess.determine
_permission
(
*
SshAccess.extract
_permission_params
(
params
,
parent
)
,
parent
)
render
json
: {
allowed
:
allowed
}
rescue
=> e
# ensure that we always return a valid response
render
json
: {
allowed
:
false
,
reason
:
"internal server problem: #{
e.message
}"
}
end
end