Add Users#show

This commit is contained in:
2023-05-05 18:29:11 +02:00
parent e68092f6b5
commit a7fce807c5
8 changed files with 68 additions and 38 deletions

View File

@@ -1,5 +1,5 @@
class UsersController < ApplicationController
before_action :find_user, only: [:destroy]
before_action :find_user, only: [:show]
before_action do
raise AccessForbidden unless current_user.at_least(:admin)
end
@@ -8,9 +8,11 @@ class UsersController < ApplicationController
@users = User.all
end
# TODO: add #show and #update to change user status
# TODO: remove admin dependent fields from registrations#edit and move them to
# #show
def show
end
# TODO: add #update to change user status
# TODO: add #become/#revert to change to user view
# NOTE: limited actions availabe to :admin by design. Users are meant to
# manage their accounts by themselves through registrations. In future :admin