diff --git a/app/controllers/token_permission_types_controller.rb b/app/controllers/token_permission_types_controller.rb new file mode 100644 index 0000000..0f0649e --- /dev/null +++ b/app/controllers/token_permission_types_controller.rb @@ -0,0 +1,15 @@ +class TokenPermissionTypesController < ApplicationController + + + def index + if user_signed_in? + @user = current_user + respond_to do |format| + format.html + end + else + render(file: File.join(Rails.root, 'public/403.html'),status: 403, layout: false) + end + end + +end \ No newline at end of file diff --git a/app/views/token_permission_types/index.html.erb b/app/views/token_permission_types/index.html.erb new file mode 100644 index 0000000..4d5a325 --- /dev/null +++ b/app/views/token_permission_types/index.html.erb @@ -0,0 +1,12 @@ + +<% @user.organisation.token_permission_types.each do |token_type|%> +
+ <%= token_type.text_desription %> +
+ +<% end %> \ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index c0a3622..9cce7b2 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -171,6 +171,8 @@ resources :plans end + resources :token_permission_types, only:[:index] + namespace :api, defaults: { format: :json } do namespace :v0 do resources :guidance_groups, only: [ :index, :show ] @@ -181,6 +183,7 @@ get '/api' => redirect('/swagger/dist/index.html?url=/apidocs/api-docs.json') + # The priority is based upon order of creation: # first created -> highest priority.