Class: ResolverController
Instance Method Summary
collapse
#archivesspace, can_access?, permission_mappings, set_access_control
Instance Method Details
#resolve_edit ⇒ Object
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
# File 'frontend/app/controllers/resolver_controller.rb', line 6
def resolve_edit
if params.has_key? :uri
resolver = Resolver.new(params[:uri])
if params.has_key?(:autoselect_repo) && resolver.repository && resolver.repository != session[:repo]
self.class.session_repo(session, resolver.repository)
selected = JSONModel(:repository).find(session[:repo_id])
flash[:success] = t("repository._frontend.messages.changed")
end
redirect_to resolver.edit_uri
else
unauthorised_access
end
end
|
#resolve_readonly ⇒ Object
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
# File 'frontend/app/controllers/resolver_controller.rb', line 22
def resolve_readonly
if params.has_key? :uri
resolver = Resolver.new(params[:uri])
if params.has_key?(:autoselect_repo) && resolver.repository && resolver.repository != session[:repo]
self.class.session_repo(session, resolver.repository)
selected = JSONModel(:repository).find(session[:repo_id])
flash[:success] = t("repository._frontend.messages.changed")
end
redirect_to resolver.view_uri
else
unauthorised_access
end
end
|