From 964261c8568a8b208816c187a660cad583eeed73 Mon Sep 17 00:00:00 2001 From: Taylor Romero Date: Sat, 29 Jun 2024 16:06:23 -0600 Subject: [PATCH] patch: section progress --- src/pages/concepts/permissions.md | 2 -- src/pages/concepts/views.md | 18 ++++++++++++++---- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/pages/concepts/permissions.md b/src/pages/concepts/permissions.md index ff18c0a3..f0e61ffe 100644 --- a/src/pages/concepts/permissions.md +++ b/src/pages/concepts/permissions.md @@ -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 -
Authenticator - See if someone is logged in, who it is, and persist a session token to keep a person logged in. diff --git a/src/pages/concepts/views.md b/src/pages/concepts/views.md index e072f85a..123d2840 100644 --- a/src/pages/concepts/views.md +++ b/src/pages/concepts/views.md @@ -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? + +
+Test 1: Is the plugin installed? ```ts import { @@ -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 +
+ +
+Production 1: Install the plugin 1. Install the module that holds the plugin: `yarn add {packageName}` 2. Create the plugin: `spruce create.view.plugin` @@ -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 +
+ +
+Test Doubling Your Plugin You can drop in your test double using the `views` fixture on your `AbstractSpruceFixtureTest`. Here is how you may do that in your `beforeEach`: @@ -258,4 +266,6 @@ class RootSkillView extends AbstractSkillViewController { this.plugins.autoLogout.doSomething() } } -``` \ No newline at end of file +``` + +
\ No newline at end of file