Skip to content

Commit 39f7c70

Browse files
committed
fixes
1 parent 6024a9c commit 39f7c70

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

samples/databases/wide-world-importers/sample-scripts/row-level-security/DemonstrateRLS.sql

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
-- Demonstrate Row Level Security
22

3-
43
USE master;
54
GO
65

@@ -82,6 +81,7 @@ GRANT SELECT ON [Application].Cities TO [Great Lakes Sales];
8281
GRANT SELECT ON [Application].Countries TO [Great Lakes Sales];
8382
GO
8483

84+
-- impersonate the user GreatLakesUser
8585
EXECUTE AS USER = 'GreatLakesUser';
8686
GO
8787

@@ -124,7 +124,7 @@ GO
124124
-- Open the second RLS demo window and follow the instructions there
125125

126126
-- Finally, tidy up (optional)
127-
127+
/*
128128
REVOKE SELECT, UPDATE ON Sales.Customers FROM [Great Lakes Sales];
129129
REVOKE SELECT ON [Application].Cities FROM [Great Lakes Sales];
130130
REVOKE SELECT ON [Application].Countries FROM [Great Lakes Sales];
@@ -151,6 +151,5 @@ GO
151151
DROP LOGIN Website;
152152
GO
153153
154-
USE tempdb;
155-
GO
156154
155+
*/

samples/databases/wide-world-importers/sample-scripts/row-level-security/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,11 @@ To run this sample, you need the following prerequisites.
4949

5050
## Sample details
5151

52-
The sample adds a new table with sensitive data about suppliers. This sensitive data is always encrypted.
52+
The sample enables row-level security in the database, for the table `Sales.Customers`. Users of the database can only see the customers they are allowed to see.
5353

54-
As part of the sample you create an encryption key that is saved locally (where you run SSMS). The client application inserts data into the table. With the sample scripts you will see how the data is encrypted in the table and cannot be viewed, even by a sysadmin, unless you have the encryption key.
54+
The user 'Great Lakes Sales' is allowed to see only the customers in the Great Lakes sales territory.
55+
56+
The Website user, which is used by the Web front-end in this scenario, configures the sales territory, and RLS takes care of the required filtering based on the information provided by the Web app.
5557

5658
<a name=disclaimers></a>
5759

0 commit comments

Comments
 (0)