Skip to content

Commit

Permalink
patch: section progress
Browse files Browse the repository at this point in the history
  • Loading branch information
liquidg3 committed Jun 29, 2024
1 parent 989b9c2 commit 964261c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
2 changes: 0 additions & 2 deletions src/pages/concepts/permissions.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
Permissions are handled by 2 main classes: `Authenticator` and `Authorizer`. The `Authenticator` is responsible for checking if someone is logged in, and the `Authorizer` is responsible for checking if a logged in person has the right permissions to do something.



## Important Classes


<details>
<summary>
<strong>Authenticator</strong> - See if someone is logged in, who it is, and persist a session token to keep a person logged in.
Expand Down
18 changes: 14 additions & 4 deletions src/pages/concepts/views.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,9 @@ You can globally enhance View Controller functionality by using View Controller

### Implementing a View Controller Plugin

#### Test 1: Is the plugin installed?

<details>
<summary><strong>Test 1:</strong> Is the plugin installed?</summary>

```ts
import {
Expand All @@ -209,7 +211,10 @@ protected static async autoLogoutPluginInstalled() {

Note: If you are planning on using your own plugin (one that is not built yet), type it instead of `AutoLogoutPlugin` as if it exists and then begin with the productions steps below.

#### Production 1: Install the plugin
</details>

<details>
<summary><strong>Production 1:</strong> Install the plugin</summary>

1. Install the module that holds the plugin: `yarn add {packageName}`
2. Create the plugin: `spruce create.view.plugin`
Expand All @@ -233,7 +238,10 @@ Note: If you using a prebuilt plugin, you would implement it like this:
export { AutoLogoutPlugin as default } from '@sprucelabs/spruce-heartwood-utils'
```

#### Test Doubling Your Plugin
</details>

<details>
<summary><strong>Test Doubling Your Plugin</strong></summary>

You can drop in your test double using the `views` fixture on your `AbstractSpruceFixtureTest`. Here is how you may do that in your `beforeEach`:

Expand All @@ -258,4 +266,6 @@ class RootSkillView extends AbstractSkillViewController {
this.plugins.autoLogout.doSomething()
}
}
```
```

</details>

0 comments on commit 964261c

Please sign in to comment.