Skip to content

Commit

Permalink
fix(docs): fixed small errors (#1574)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xflotus authored and nnixaa committed Jun 13, 2019
1 parent 73c5d36 commit 03a8085
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docs/articles/auth/guard.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export class AuthGuard implements CanActivate {
}

canActivate() {
return this.authService.isAuthenticated(); // canActive can return Observable<boolean>, which is exactly what isAuhenticated returns
return this.authService.isAuthenticated(); // canActive can return Observable<boolean>, which is exactly what isAuthenticated returns
}
}
```
Expand Down Expand Up @@ -125,7 +125,7 @@ export class AuthGuard implements CanActivate {
}
}
```
*So we just check the the value returened by isAuthenticated and simply redirect to the login page.*
*So we just check the the value returned by isAuthenticated and simply redirect to the login page.*

Easy as that! Hope you found it useful.
<hr>
Expand Down
2 changes: 1 addition & 1 deletion docs/articles/auth/token.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export class HeaderComponent {
.subscribe((token: NbAuthJWTToken) => {

if (token.isValid()) {
this.user = token.getPayload(); // here we receive a payload from the token and assigne it to our `user` variable
this.user = token.getPayload(); // here we receive a payload from the token and assigns it to our `user` variable
}

});
Expand Down
4 changes: 2 additions & 2 deletions docs/articles/security/acl-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Now, let's convert this into an ACL configuration object which Nebular can under
```
As you can see the configuration is pretty much straightforward, each role can have a list of permissions (view, create, remove) and resources that are allowed for those permissions. We can also specify a `*` resource,
which means that we have a permission againts any resource (like moderators can remove both news and comments).
which means that we have a permission against any resource (like moderators can remove both news and comments).
<hr>
## Role Configuration
Expand Down Expand Up @@ -141,7 +141,7 @@ export class RoleProvider implements NbRoleProvider {
}
```
So we subscribe to the `tokenChange` observable, which will produce a new token each time authentication change occurres.
So we subscribe to the `tokenChange` observable, which will produce a new token each time authentication change occurs.
Then we simply get a role from a token (for example simplicity, we assume that token payload always has a role value) or return default `guest` value.
Don't worry if your setup does not use Nebular Auth. You can adjust this code to retrieve a user role from any service of your own.
Expand Down
2 changes: 2 additions & 0 deletions docs/articles/security/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@ First, let's install the module as it's distributed as an npm package. Security
npm i @nebular/security@next
```
<hr>

## Import the module:

```ts
import { NbSecurityModule } from '@nebular/security';
```
<hr>

## Register it

Now, let's register the module in the root module:
Expand Down

0 comments on commit 03a8085

Please sign in to comment.