Skip to content

Commit

Permalink
Merge pull request #1660 from letmejustputthishere/patch-16
Browse files Browse the repository at this point in the history
Update access-control.md
  • Loading branch information
jessiemongeon1 authored Jul 10, 2023
2 parents c831934 + 321c0b5 commit e6002dc
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions docs/developer-docs/backend/motoko/access-control.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,17 +169,17 @@ shared({ caller = initializer }) actor class() {
};
```

Let's take a look at a few key elements of this dapp:
Let's take a look at a few key elements of this dapp:

- You might notice that the `greet` function is a variation on the `greet` function you have seen in previous guides. In this dapp, however, the `greet` function uses a message caller to determine the permissions that should be applied and, based on the permissions associated with the caller, which greeting to display.
- You might notice that the `greet` function is a variation on the `greet` function you have seen in previous guides. In this dapp, however, the `greet` function uses a message caller to determine the permissions that should be applied and, based on the permissions associated with the caller, which greeting to display.

- The dapp defines two custom types—one for `Roles` and one for `Permissions`.
- The dapp defines two custom types—one for `Roles` and one for `Permissions`.

- The `assign_roles` function enables the message caller to assign a role to the principal associated with an identity.
- The `assign_roles` function enables the message caller to assign a role to the principal associated with an identity.

- The `callerPrincipal` function enables you to return the principal associated with an identity.
- The `callerPrincipal` function enables you to return the principal associated with an identity.

- The `my_role` function enables you to return the role that is associated with an identity.
- The `my_role` function enables you to return the role that is associated with an identity.

- #### Step 3: Save your changes and close the `main.mo` file to continue.

Expand Down Expand Up @@ -490,4 +490,4 @@ To stop the local canister execution environment:

If you are looking for more information about identity and authentication, check out the following related resources:

- [dfx identity (command reference)](/references/cli-reference/dfx-identity.md).
- [dfx identity (command reference)](/references/cli-reference/dfx-identity.md).

0 comments on commit e6002dc

Please sign in to comment.