Skip to content

Commit

Permalink
fix: app info
Browse files Browse the repository at this point in the history
  • Loading branch information
jannyHou committed Feb 26, 2020
1 parent 1dbe734 commit 6cbf702
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion examples/access-control-migration/LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) IBM Corp. 2018,2019. All Rights Reserved.
Copyright (c) IBM Corp. 2020. All Rights Reserved.
Node module: @loopback/example-access-control-migration
This project is licensed under the MIT License, full text below.

Expand Down
10 changes: 5 additions & 5 deletions examples/access-control-migration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ the access control.

## Overview

This tutorial demonstrates how to implement a RBAC(role based access control)
This tutorial demonstrates how to implement a RBAC(Role Based Access Control)
system and provides 5 endpoints to test different role's permissions. The
tutorial of building it from a dummy application is documented in
tutorial of building it from a dummy application documented in
![auth-example-migration-tutorial](https://github.com/strongloop/loopback-next/blob/auth-migration/docs/site/migration/auth/example.md)

## Setup

First, you'll need to install a supported version of Node:

- [Node.js](https://nodejs.org/en/) at v8.9 or greater
- [Node.js](https://nodejs.org/en/) at v10 or greater

Additionally, this tutorial assumes that you are comfortable with certain
technologies, languages and concepts.
Expand All @@ -41,8 +41,8 @@ application, follow these steps:
Server is running at http://127.0.0.1:3000
```

Then try each role's permission by following the
[try out section](https://github.com/strongloop/loopback-next/blob/auth-migration/docs/site/migration/auth/example.md#try-out)
Then try different roles' permissions by following the
[try it out section](https://github.com/strongloop/loopback-next/blob/auth-migration/docs/site/migration/auth/example.md#try-it-out)

### Need help?

Expand Down
7 changes: 3 additions & 4 deletions examples/access-control-migration/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "@loopback/example-access-control-migration",
"version": "1.9.5",
"version": "1.0.0",
"description": "Tutorial example on how to migrate the access control example with LoopBack 4.",
"main": "index.js",
"engines": {
"node": ">=8.9"
"node": ">=10"
},
"author": "IBM Corp.",
"scripts": {
Expand Down Expand Up @@ -51,8 +51,7 @@
"@types/bcryptjs": "2.4.2",
"casbin": "^3.1.0",
"jsonwebtoken": "^8.5.1",
"loopback-connector-rest": "^3.6.0",
"path": "^0.12.7"
"loopback-connector-rest": "^3.6.0"
},
"devDependencies": {
"@loopback/build": "^3.1.1",
Expand Down
5 changes: 2 additions & 3 deletions examples/access-control-migration/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">

<head>
<title>@loopback/example-todo</title>
<title>@loopback/example-access-control-migration</title>

<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
Expand Down Expand Up @@ -56,7 +56,7 @@

<body>
<div class="info">
<h1>@loopback/example-todo</h1>
<h1>@loopback/example-access-control-migration</h1>

<h3>OpenAPI spec: <a href="/openapi.json">/openapi.json</a></h3>
<h3>API Explorer: <a href="/explorer">/explorer</a></h3>
Expand All @@ -70,4 +70,3 @@ <h3>API Explorer: <a href="/explorer">/explorer</a></h3>
</body>

</html>

5 changes: 4 additions & 1 deletion examples/access-control-migration/src/application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,10 @@ export class AccessControlApplication extends BootMixin(
addSecuritySpec(): void {
this.api({
openapi: '3.0.0',
info: {title: 'access-control-example', version: '1.0.0'},
info: {
title: 'access-control-example',
version: require('.././package.json').version,
},
paths: {},
components: {securitySchemes: SECURITY_SCHEME_SPEC},
security: [
Expand Down

0 comments on commit 6cbf702

Please sign in to comment.