Skip to content

Commit 3704d46

Browse files
committed
Admin Dashboard available only when logins enabled
1 parent ed74fd0 commit 3704d46

File tree

2 files changed

+17
-13
lines changed

2 files changed

+17
-13
lines changed

Configuration.md

+8-6
Original file line numberDiff line numberDiff line change
@@ -598,24 +598,26 @@ If you are unable to have these headers passed to the application for any reason
598598

599599
## Introduction
600600

601-
Password Pusher bundles an Admin dashboard for self-hosted instances available at `/admin`. This dashboard allows for direct database access, so care should be taken. Access to this dashboard is limited to Administrator accounts only.
601+
Password Pusher bundles an Admin dashboard for self-hosted instances available at `/admin`. This dashboard allows for direct database access, so care should be taken.
602+
603+
It is only enabled with logins are enabled (`enable_logins`) and access is limited to accounts marked as "Administrator" only.
602604

603605
### Security & Access
604606

605607
Access to the Admin dashboard grants direct access to the application's database.
606608

607-
Accessing the dashboard is disabled by default and only allowed for accounts that you specifically mark as "Administrator".. Make sure to restrict access to authorized personnel only to prevent unauthorized access and potential security breaches.
609+
Accessing the admin dashboard is accessible by accounts that you specifically mark as "Administrator". Make sure to restrict access to authorized personnel only to prevent unauthorized access and potential security breaches.
608610

609-
For administrators to access the Admin dashboard, you must have:
611+
To access the Admin dashboard, you must have:
610612

611613
- Logins enabled for your instance
612-
- An account registered and confirmed
614+
- An account registered, confirmed and marked as an "Administrator"
613615

614616
For instructions on enabling logins and account registration, see previous sections above.
615617

616618
## Marking a User as an Administrator
617619

618-
To mark a user account as an Administrator, follow these steps:
620+
To mark a user account as an Administrator, you will need the email that the account registered with. With that email, follow these steps:
619621

620622
1. Open an application console by accessing the server where the application code resides. For example, if using Docker, navigate to `/opt/PasswordPusher`:
621623

@@ -655,4 +657,4 @@ Upon successful execution, you will receive a confirmation message indicating th
655657

656658
## Feedback
657659

658-
If you encounter any difficulties or have suggestions for improvement, please provide feedback or ask questions. Your input is valuable for enhancing the documentation and user experience.
660+
If you encounter any difficulties or have suggestions for improvement, let me know or file an issue in Github.

config/routes.rb

+9-7
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,16 @@
33
Rails.application.routes.draw do
44
match "(*any)", to: redirect(subdomain: ""), via: :all, constraints: {subdomain: "www"} if ENV.key?("PWPUSH_COM")
55

6-
namespace :admin do
7-
resources :file_pushes
8-
resources :passwords
9-
resources :urls
10-
resources :users
11-
resources :views
6+
if Settings.enable_logins
7+
namespace :admin do
8+
resources :file_pushes
9+
resources :passwords
10+
resources :urls
11+
resources :users
12+
resources :views
1213

13-
root to: "users#index"
14+
root to: "users#index"
15+
end
1416
end
1517

1618
localized do

0 commit comments

Comments
 (0)