Skip to content

Commit

Permalink
📝 Update outdated docs pages
Browse files Browse the repository at this point in the history
At least what I noticed
  • Loading branch information
aaronleopold committed Apr 20, 2024
1 parent 9c89774 commit 79592dc
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 42 deletions.
3 changes: 2 additions & 1 deletion core/src/db/entity/user/permissions.rs
Expand Up @@ -19,6 +19,7 @@ impl From<prisma::age_restriction::Data> for AgeRestriction {
}
}

// TODO: consider separating some of the `manage` permissions into more granular permissions
// TODO: consider adding self:update permission, useful for child accounts
/// Permissions that can be granted to a user. Some permissions are implied by others,
/// and will be automatically granted if the "parent" permission is granted.
Expand Down Expand Up @@ -58,7 +59,6 @@ pub enum UserPermission {
/// Grant access to delete the library (manage library)
#[serde(rename = "library:delete")]
DeleteLibrary,
// TODO: ReadUsers, CreateUsers, ManageUsers
/// Grant access to read users.
///
/// Note that this is explicitly for querying users via user-specific endpoints.
Expand Down Expand Up @@ -143,6 +143,7 @@ impl ToString for UserPermission {
}
}

// TODO: refactor to remove panic :grimace:
impl From<&str> for UserPermission {
fn from(s: &str) -> UserPermission {
match s {
Expand Down
21 changes: 14 additions & 7 deletions docs/pages/guides/access-control/age-restrictions.mdx
Expand Up @@ -3,9 +3,8 @@ import { Callout } from 'nextra-theme-docs'
# Age Restrictions

<Callout emoji="🚧">
This functionality is experimental. Please ensure you properly test any configured age
restrictions to ensure they work as expected with your library **before** you give the restricted
user access to their account.
Please ensure you properly test any configured age restrictions to ensure they work as expected
with your library **before** you give the restricted user access to their account.
</Callout>

Age restrictions are set on a per-user basis, and are used to determine whether or not a user can access a book. For more information on users and user management, see the dedicated [users](/guides/access-control/users) page.
Expand Down Expand Up @@ -40,6 +39,13 @@ The age restriction is located directly within the metadata for a book itself, o

This means that **without metadata, Stump cannot determine whether or not a book is age-allowed**. There are fallback options described below.

#### EPUB

Stump will attempt to parse one of the following from an EPUB file's metadata:

- `typicalAgeRange`: Generally in the format of `[number]-[number]`
- `contentRating`: Subject to the publisher, but generally similar to that you'd find on a movie or TV show

### How does Stump determine whether or not a book is age-allowed?

If a book or a book's series has an age restriction set, Stump will use that age restriction to determine whether or not a user can access it. The comparison done internally is `less than or equal to X number`, meaning that if a user has an age restriction set to `13` and a book is rated to `17`, the user will not be able to access the book. If a user has an age restriction set to `17` and a book is rated to `13`, the user will be able to access the book. In other words, **the age restriction set on the user must be greater than or equal to the age restriction number set on the book or series in order to have access**.
Expand All @@ -53,7 +59,8 @@ Stump doesn't currently support editing metadata directly, but it is planned for

### Other considerations

- Stump doesn't currently support dynamic thumbnails for libraries containing age-restricted books or series. This means that if it happens to be the case that the first book in the first series of a library is age-restricted, the thumbnail for the library **will still be displayed** so long as a user has access to the library. This is planned to be fixed in the future by one of two ways:
1. Settings will be made available to override the thumbnail for a library or series
2. Server owners will be able to associate libraries and series with tags and then set restrictions on a user that would prevent access to specific tags. See the [Tag-based restrictions](#tag-based-restrictions) section for more information.
3. Server owners can exclude users from seeing certain libraries entirely
#### Library thumbnails

If you generated a library thumbnail for a library which coincidentally contains an age-restricted book that is ordered first, the thumbnail will still be displayed so long as a user has access to the library.

You can get around this by setting a the thumbnail to source from a different book, or uploading a custom thumbnail.
19 changes: 6 additions & 13 deletions docs/pages/guides/basics/scanner.mdx
Expand Up @@ -92,17 +92,10 @@ For convenience, there are a few preset options you may select from the dropdown

> In the future, this section of the UI will change to include scheduling options for more than just scans. However, for now, it is only for scans.
## Ignore Files
## Ignoring files

Stump has minimal support for a custom `.stumpignore` file, which allows you to ignore certain files and directories from being scanned. This is useful for files which are organized with your media, but you don't want to be included in the library.

Some examples you can achieve with this:

```bash
# Ignore all files in the "extras" directory
extras/
# Ignore all files in the "extras" directory, except for "extras/include-me.cbz"
!extras/include-me.cbz
```

Please note, that in the above example, if you exclude an entire directory and explicitly include a file in that directory, a series will still potentially be created for that directory depending on which [library pattern](/guides/libraries#library-patterns) you have configured. If it does get created, `include-me.cbz` will be the only file in the series.
<Callout emoji="">
Stump has removed support for `.stumpignore` files in favor of a more robust configuration system.
The corresponding GitHub issue for tracking is
[#284](https://github.com/stumpapp/stump/issues/284)
</Callout>
2 changes: 1 addition & 1 deletion docs/pages/guides/mobile/app.mdx
Expand Up @@ -5,7 +5,7 @@ import { Callout } from 'nextra-theme-docs'
<Callout emoji="🚧">
A mobile app is currently in the **very early** stages of development, thanks primarily to the efforts of two contributors! If you are a mobile developer and would like to help out, please feel free to reach out.

If you're interested in updates, you can track the broad progress on the [mobile-app feature branch](https://github.com/stumpapp/stump/tree/mobile-app) on GitHub. As development progresses a bit more to an MVP, I'll be sure to add a dedicated project for better tracking
If you're interested in updates, you can track the broad progress via the [are we mobile yet](https://github.com/orgs/stumpapp/projects/8) project board.

</Callout>

Expand Down
32 changes: 16 additions & 16 deletions docs/pages/installation/docker.mdx
Expand Up @@ -26,6 +26,13 @@ echo -e "PUID=$(id -u)\nPGID=$(id -g)"

<Tabs.Tab>

<Callout emoji="☢️">
This tutorial uses the newer `docker compose` CLI. If you find this command does not exist for
you, you might be on V1, which uses `docker-compose`. Please review [Docker's
documentation](https://docs.docker.com/compose/install/) for more information and/or
platform-specific installation.
</Callout>

<Steps>

### Create a `docker-compose.yml` file
Expand All @@ -36,12 +43,12 @@ Below is an example of a Docker Compose file you can use to bootstrap your Stump
version: '3.3'
services:
stump:
image: aaronleopold/stump:nightly
image: aaronleopold/stump:latest
container_name: stump
# Replace my paths (prior to the colons) with your own
volumes:
- /Users/aaronleopold/.stump:/config
- /Users/aaronleopold/Documents/Stump:/data
- /home/aaronleopold/.stump:/config
- /media/books:/data
ports:
- 10801:10801
environment:
Expand Down Expand Up @@ -70,13 +77,6 @@ docker compose up -d

</Steps>

<Callout emoji="☢️">
This tutorial uses the newer `docker compose` CLI. If you find this command does not exist for
you, you might be on V1, which uses `docker-compose`. Please review [Docker's
documentation](https://docs.docker.com/compose/install/) for more information and/or
platform-specific installation.
</Callout>

</Tabs.Tab>

<Tabs.Tab>
Expand All @@ -92,17 +92,17 @@ docker create \
-e "PUID=1000" \
-e "PGID=1000" \
-p 10801:10801 \
--volume "/Users/aaronleopold/.stump:/config" \
--volume "/Users/aaronleopold/Documents/Stump:/data" \
--volume "/home/aaronleopold/.stump:/config" \
--volume "/media/books:/data" \
--restart unless-stopped \
aaronleopold/stump:nightly
aaronleopold/stump:latest
```

If you prefer bind mounts, you can swap out the two `--volume` lines with:

```bash
--mount type=volume,source=/Users/aaronleopold/.stump,target=/config \
--mount type=volume,source=/Users/aaronleopold/Documents/Stump,target=/data \
--mount type=volume,source=/home/aaronleopold/.stump,target=/config \
--mount type=volume,source=/media/books,target=/data \
```

### Start the container
Expand All @@ -116,7 +116,7 @@ docker start stump
When a new image is available, you can update your container using these commands:

```bash
docker pull aaronleopold/stump:nightly
docker pull aaronleopold/stump:latest
docker restart stump
```

Expand Down
7 changes: 3 additions & 4 deletions docs/pages/installation/executable.mdx
Expand Up @@ -5,12 +5,11 @@ import { Tabs } from 'nextra/components'
# Executable

<Callout emoji="☢️">
Any present tense information in this section is not accurate. Once a release is made, the
following information will apply shortly thereafter.
Native executables are not yet available. The corresponding GitHub issue for tracking is
[#310](https://github.com/stumpapp/stump/issues/310). For now, you can install Stump using
[Docker](/installation/docker) or directly from [source](/installation/source).
</Callout>

Pre-built binaries will be generally available on [GitHub](https://github.com/stumpapp/stump/releases) after `0.1.0` is released. Until then, only Docker images are available.

## Platform-specific instructions

Select your platform to view the installation instructions
Expand Down
Expand Up @@ -69,6 +69,7 @@ export default function LibraryExclusions() {
return null
}

// TODO: disabled state if no options
return (
<div className="flex flex-col gap-4">
<div>
Expand Down
Expand Up @@ -8,6 +8,8 @@ import { CreateOrUpdateLibraryForm } from './form'
import LibraryExclusions from './LibraryExclusions'
import QuickActions from './QuickActions'

// TODO: redesign this page, it is ugly.

export default function LibrarySettingsScene() {
const { library } = useLibraryContext()
const { libraries } = useLibraries()
Expand Down

0 comments on commit 79592dc

Please sign in to comment.