[15-min-fix] Remove/Update the last of the admin hardcoded paths (#13681)

* chore: hardcoded paths

* hardcoded docs path

* Update docs/admin/admin-search.md

Co-authored-by: rhymes <github@rhymes.dev>

Co-authored-by: rhymes <github@rhymes.dev>
This commit is contained in:
Ridhwana 2021-05-06 15:12:06 +02:00 committed by GitHub
parent 2a05955092
commit 449723d8c7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 14 additions and 13 deletions

View file

@ -12,8 +12,8 @@ documentation, but if you're looking for an example of how it's being used on
Forem, we've implemented it to help searching and sorting user reports.
The view responsible for managing user reports can be found at
`localhost:3000/admin/reports` and Ransack can be seen in use on the index
action of the [`admin/feedback_messages_controller`][feedback_messages].
`/admin/moderation/reports` and Ransack can be seen in use on the
index action of the [`admin/feedback_messages_controller`][feedback_messages].
For Forem, Ransack is being used exclusively in admin, for search problems in
other parts of the app we use [PostgreSQL Full Text Search][postgres_fts].

View file

@ -22,7 +22,7 @@ Rolify by assigning the role `single_resource_admin` to a user.
`single_resource_admin` users are given access to a Ruby class. In the codebase,
there are admin models, not backed by database tables, that exist for this
purpose. For example, if you needed to give a user access to only
`/admin/welcome`, you'd run the following command in the Rails console:
`/admin/apps/welcome`, you'd run the following command in the Rails console:
```ruby
user = User.find(some_user_id)

View file

@ -56,7 +56,8 @@ Account.
# Configuring the Rails Application
Now with both the Service ID and Key you'll need to enable Apple Authentication
and pass in the credentials in the admin dashboard `/admin/config`.
and pass in the credentials in the admin dashboard
`/admin/customization/config`.
![Admin Authentication Configuration Dashboard](https://user-images.githubusercontent.com/6045239/92613383-25a83780-f278-11ea-94a7-b710da544c9d.png)

View file

@ -21,7 +21,7 @@ environments. Examples:
Settings managed via your ENV can be found in
[Configuring Environment Variables](/getting-started/config-env)) and viewed at
`/admin/config` (see [the Admin guide](/admin)):
`/admin/customization/config` (see [the Admin guide](/admin)):
![Screenshot of env variable admin interface](https://user-images.githubusercontent.com/47985/73627243-67d41f80-467e-11ea-9121-221275ff8a89.png)
@ -37,7 +37,7 @@ Examples:
These settings can be accessed via the
[`SiteConfig`](https://github.com/forem/forem/blob/master/app/models/site_config.rb)
object and various models in the `Settings::` namespace and viewed / modified
via `/admin/config` (see [the Admin guide](/admin)).
via `/admin/customization/config` (see [the Admin guide](/admin)).
![Screenshot of site configuration admin interface](https://user-images.githubusercontent.com/47985/73627238-6276d500-467e-11ea-8724-afb703f056bc.png)

View file

@ -9,7 +9,7 @@ title: Configuring Forem
As a Forem admin, one of the first steps of managing your site will be to tailor
your content, branding and other important details based on your community
goals. This is made simple by the configuration page which can be found at
https://<span></span>your.forem.url/admin/config.
https://<span></span>your.forem.url/admin/customization/config.
_We advise that you first complete the minimum set up before sending out your
Forem link to your community._
@ -25,7 +25,7 @@ This banner indicates that the Forem configuration process hasn't been completed
yet.
When you click on the link on banner, it will take you to the configuration page
(i.e. https://<span></span>your.forem.url/admin/config).
(i.e. https://<span></span>your.forem.url/admin/customization/config).
On this page you will see that the Get Started section is expanded. It contains
all the mandatory fields that need to be filled out in order for the site to be

View file

@ -51,7 +51,7 @@ RSpec.describe "/admin/invitations", type: :request do
expect do
delete admin_invitation_path(invitation.id)
end.to change { User.all.count }.by(-1)
expect(response.body).to redirect_to "/admin/invitations"
expect(response.body).to redirect_to admin_invitations_path
end
end
end

View file

@ -10,7 +10,7 @@ RSpec.describe "/admin/permissions", type: :request do
it "blocks the request" do
expect do
get "/admin/permissions"
get admin_permissions_path
end.to raise_error(Pundit::NotAuthorizedError)
end
end
@ -20,7 +20,7 @@ RSpec.describe "/admin/permissions", type: :request do
before do
sign_in super_admin
get "/admin/permissions"
get admin_permissions_path
end
it "allows the request" do
@ -33,7 +33,7 @@ RSpec.describe "/admin/permissions", type: :request do
before do
sign_in single_resource_admin
get "/admin/permissions"
get admin_permissions_path
end
it "allows the request" do
@ -50,7 +50,7 @@ RSpec.describe "/admin/permissions", type: :request do
it "blocks the request" do
expect do
get "/admin/permissions"
get admin_permissions_path
end.to raise_error(Pundit::NotAuthorizedError)
end
end